bool _resizable;
bool _movable;
bool hoverBorder = false;
+ bool alwaysOnTop = false;
Rectangle savedBounds;
bool _minimized = false;
[XmlIgnore]public bool IsNormal {
get { return !(IsMaximized|_minimized); }
}
+ [XmlAttributeAttribute][DefaultValue(false)]
+ public bool AlwaysOnTop {
+ get {
+ return alwaysOnTop;
+ }
+ set {
+ if (alwaysOnTop == value)
+ return;
+ alwaysOnTop = value;
+ if (alwaysOnTop) {
+ CurrentInterface.PutOnTop (this);
+ CurrentInterface.TopWindows++;
+ }else
+ CurrentInterface.TopWindows--;
+ NotifyValueChanged ("AlwaysOnTop", alwaysOnTop);
+ }
+ }
// [XmlAttributeAttribute()][DefaultValue(WindowState.Normal)]
// public virtual WindowState State {
// get { return _state; }
/// on the first instance creation of a IML item.
/// </summary>
public static Dictionary<String, Instantiator> Instantiators = new Dictionary<string, Instantiator>();
+ public bool DesignMode = false;
+ public int TopWindows = 0;//window always on top count
#endregion
#region Private Fields
public void AddWidget(GraphicObject g)
{
g.Parent = this;
- GraphicTree.Insert (0, g);
+ int ptr = TopWindows;
+ if (g is Window) {
+ if ((g as Window).AlwaysOnTop)
+ ptr = 0;
+ }
+ GraphicTree.Insert (ptr, g);
g.RegisteredLayoutings = LayoutingType.None;
g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
}
/// <summary> Put widget on top of other root widgets</summary>
public void PutOnTop(GraphicObject g)
{
- if (GraphicTree.IndexOf(g) > 0)
+ if (GraphicTree.IndexOf(g) > TopWindows)
{
GraphicTree.Remove(g);
- GraphicTree.Insert(0, g);
+ GraphicTree.Insert(TopWindows, g);
EnqueueForRepaint (g);
}
}