/// <summary> Remove all Graphic objects from top container </summary> public void ClearInterface() { int i = 0; while (GraphicObjects.Count > 0) { GraphicObject g = GraphicObjects [i]; g.Visible = false; g.ClearBinding(); GraphicObjects.RemoveAt(0); } }
internal virtual void SetChild(GraphicObject _child) { if (child != null) { child.ClearBinding(); contentSize = new Size(0, 0); child.LayoutChanged -= OnChildLayoutChanges; child.Parent = null; this.RegisterForGraphicUpdate(); } child = _child as GraphicObject; if (child != null) { child.Parent = this; child.LayoutChanged += OnChildLayoutChanges; contentSize = child.Slot.Size; child.RegisteredLayoutings = LayoutingType.None; child.RegisterForLayouting(LayoutingType.Sizing); } }
public virtual void ClearChildren() { while (Children.Count > 0) { GraphicObject g = Children[Children.Count - 1]; g.LayoutChanged -= OnChildLayoutChanges; g.ClearBinding(); g.Parent = null; Children.RemoveAt(Children.Count - 1); } resetChildrenMaxSize(); this.RegisterForLayouting(LayoutingType.Sizing); ChildrenCleared.Raise(this, new EventArgs()); }
public virtual void RemoveChild(GraphicObject child) { child.LayoutChanged -= OnChildLayoutChanges; child.ClearBinding(); //child.Parent = null; lock (children) Children.Remove(child); if (child == largestChild && Width == Measure.Fit) { searchLargestChild(); } if (child == tallestChild && Height == Measure.Fit) { searchTallestChild(); } this.RegisterForLayouting(LayoutingType.Sizing | LayoutingType.ArrangeChildren); }
public void DeleteWidget(GraphicObject g) { g.Visible = false; //trick to ensure clip is added to refresh zone g.ClearBinding(); GraphicObjects.Remove(g); }
public void DeleteWidget(GraphicObject g) { g.Visible = false;//trick to ensure clip is added to refresh zone g.ClearBinding(); GraphicObjects.Remove (g); }