TextAlignment="Left"
Multiline="true" />
</HorizontalStack>
- <HorizontalStack Margin="1" Height="Fit" Width="60%" HorizontalAlignment="Right">
- <Button Width="48%" Caption="Ok" MouseClick="./onOkButtonClick" />
- <GraphicObject Width="4%" Height="5"/>
- <Button Width="48%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
+ <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
+ <Button Width="50%" Caption="Ok" MouseClick="./onOkButtonClick" />
+ <Button Width="50%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
</HorizontalStack>
</VerticalStack>
</Border>
}
#endregion
+ #region Default and Style Values loading
/// <summary> Loads the default values from XML attributes default </summary>
public void loadDefaultValues()
{
}
return true;
}
-
+ #endregion
public virtual GraphicObject FindByName(string nameToFind){
return string.Equals(nameToFind, _name, StringComparison.Ordinal) ? this : null;
if (!Visible)
return;
+ //TODO:this test should not be necessary
+ if (Slot.Height < 0 || Slot.Width < 0)
+ return;
+
LastPaintedSlot = Slot;
#if DEBUG_LAYOUTING
if (CurrentDrawLQIs != null){
return;
GenericStack gs = Parent as GenericStack;
- int ptrThis = gs.Children.IndexOf (this);
+ int ptrSplit = gs.Children.IndexOf (this);
+
+ if (ptrSplit == 0 || ptrSplit == gs.Children.Count - 1)
+ return;
if (gs.Orientation == Orientation.Horizontal) {
- if (ptrThis >= 0){
- if (!gs.Children [ptrThis - 1].Width.IsFixed)
- gs.Children [ptrThis - 1].Width = gs.Children [ptrThis - 1].Slot.Width;
- gs.Children [ptrThis - 1].Width = Math.Max(gs.Children [ptrThis - 1].Width + e.XDelta, 1);
- }
- if (ptrThis < gs.Children.Count - 1){
- if (!gs.Children [ptrThis + 1].Width.IsFixed)
- gs.Children [ptrThis + 1].Width = gs.Children [ptrThis + 1].Slot.Width;
- gs.Children [ptrThis + 1].Width = Math.Max(gs.Children [ptrThis + 1].Width - e.XDelta, 1);
- }
+ if ((gs.Children [ptrSplit - 1].Width + e.XDelta <
+ gs.Children [ptrSplit - 1].MinimumSize.Width) ||
+ (gs.Children [ptrSplit + 1].Width - e.XDelta <
+ gs.Children [ptrSplit + 1].MinimumSize.Width))
+ return;
+
+ if (!gs.Children [ptrSplit - 1].Width.IsFixed)
+ gs.Children [ptrSplit - 1].Width = gs.Children [ptrSplit - 1].Slot.Width;
+ if (!gs.Children [ptrSplit + 1].Width.IsFixed)
+ gs.Children [ptrSplit + 1].Width = gs.Children [ptrSplit + 1].Slot.Width;
+
+ gs.Children [ptrSplit - 1].Width = gs.Children [ptrSplit - 1].Width + e.XDelta;
+ gs.Children [ptrSplit + 1].Width = gs.Children [ptrSplit + 1].Width - e.XDelta;
+
} else {
- if (ptrThis >= 0) {
- if (!gs.Children [ptrThis - 1].Height.IsFixed)
- gs.Children [ptrThis - 1].Height = gs.Children [ptrThis - 1].Slot.Height;
- gs.Children [ptrThis - 1].Height = Math.Max (gs.Children [ptrThis - 1].Height + e.YDelta, 1);
- }
- if (ptrThis < gs.Children.Count - 1) {
- if (!gs.Children [ptrThis + 1].Height.IsFixed)
- gs.Children [ptrThis + 1].Height = gs.Children [ptrThis + 1].Slot.Height;
- gs.Children [ptrThis + 1].Height = Math.Max (gs.Children [ptrThis + 1].Height - e.YDelta, 1);
- }
+ if ((gs.Children [ptrSplit - 1].Height + e.YDelta <
+ gs.Children [ptrSplit - 1].MinimumSize.Height) ||
+ (gs.Children [ptrSplit + 1].Height - e.YDelta <
+ gs.Children [ptrSplit + 1].MinimumSize.Height))
+ return;
+
+ if (!gs.Children [ptrSplit - 1].Height.IsFixed)
+ gs.Children [ptrSplit - 1].Height = gs.Children [ptrSplit - 1].Slot.Height;
+ if (!gs.Children [ptrSplit + 1].Height.IsFixed)
+ gs.Children [ptrSplit + 1].Height = gs.Children [ptrSplit + 1].Slot.Height;
+
+ gs.Children [ptrSplit - 1].Height = gs.Children [ptrSplit - 1].Height + e.YDelta;
+ gs.Children [ptrSplit + 1].Height = gs.Children [ptrSplit + 1].Height - e.YDelta;
}
}
public override bool UpdateLayout (LayoutingType layoutType)
using System.Threading;
using System.IO;
using System.Text;
+using System.Diagnostics;
namespace Crow
{
#if DEBUG_LOAD
loadingTime.Stop ();
Debug.WriteLine ("IML Instantiator creation '{2}' : {0} ticks, {1} ms",
- loadingTime.ElapsedTicks, loadingTime.ElapsedMilliseconds, path);
+ loadingTime.ElapsedTicks, loadingTime.ElapsedMilliseconds, imlPath);
#endif
}
public Instantiator (Type _root, Interface.LoaderInvoker _loader)