public void RemoveVisualChild(Visual child) { if (child.VisualParent != this) { return; } visualChildren.Remove(child); child.VisualParent = null; foreach (IRenderElementFactory factory in visualRenderElements.Keys) { visualRenderElements[factory].RemoveChild(child.GetRenderElement(factory)); } }
public void RemoveVisualChild(Visual child) { if (child.VisualParent != this) { return; } visualChildren.Remove(child); child.VisualParent = null; if (visualRenderElement != null) { visualRenderElement.RemoveChild(child.GetRenderElement(renderElementFactory)); } InvalidateHitTestBounds(); }
public void RemoveVisualChild(Visual child) { if (child.VisualParent != this) { return; } visualChildren.Remove(child); child.VisualParent = null; foreach (IRenderElementFactory factory in visualRenderElements.Factories) { visualRenderElements.GetRenderElement(factory).RemoveChild(child.GetRenderElement(factory)); } InvalidateHitTestBounds(); }
public void SetVisualChildIndex(Visual child, int newIndex) { int oldIndex = visualChildren.IndexOf(child); if (oldIndex == -1 || oldIndex == newIndex) { return; } visualChildren.Remove(child); visualChildren.Insert(newIndex, child); if (visualRenderElement != null) { object childRenderElement = child.GetRenderElement(renderElementFactory); visualRenderElement.RemoveChild(childRenderElement); visualRenderElement.InsertChild(renderChildrenOffset + newIndex, childRenderElement); } }
public void SetVisualChildIndex(Visual child, int newIndex) { int oldIndex = visualChildren.IndexOf(child); if (oldIndex == -1 || oldIndex == newIndex) { return; } visualChildren.Remove(child); visualChildren.Insert(newIndex, child); foreach (IRenderElementFactory factory in visualRenderElements.Keys) { object childRenderElement = child.GetRenderElement(factory); visualRenderElements[factory].RemoveChild(childRenderElement); visualRenderElements[factory].InsertChild(newIndex, childRenderElement); } }
public void AddVisualChild(Visual child) { if (child.VisualParent == this) { return; } if (child.VisualParent != null) { child.VisualParent.RemoveVisualChild(child); } child.VisualParent = this; visualChildren.Add(child); int renderChildIndex = containsContentRenderElement ? visualChildren.Count : visualChildren.Count - 1; foreach (IRenderElementFactory factory in visualRenderElements.Keys) { visualRenderElements[factory].InsertChild(renderChildIndex, child.GetRenderElement(factory)); } }
public void SetVisualChildIndex(Visual child, int newIndex) { int oldIndex = visualChildren.IndexOf(child); if (oldIndex == -1 || oldIndex == newIndex) { return; } visualChildren.Remove(child); visualChildren.Insert(newIndex, child); foreach (IRenderElementFactory factory in visualRenderElements.Keys) { object childRenderElement = child.GetRenderElement(factory); visualRenderElements[factory].RemoveChild(childRenderElement); visualRenderElements[factory].InsertChild(newIndex, childRenderElement); } }
public void RemoveVisualChild(Visual child) { if (child.VisualParent != this) { return; } visualChildren.Remove(child); child.VisualParent = null; foreach (IRenderElementFactory factory in visualRenderElements.Keys) { visualRenderElements[factory].RemoveChild(child.GetRenderElement(factory)); } }
public void AddVisualChild(Visual child) { if (child.VisualParent == this) { return; } if (child.VisualParent != null) { child.VisualParent.RemoveVisualChild(child); } child.VisualParent = this; visualChildren.Add(child); int renderChildIndex = containsContentRenderElement ? visualChildren.Count : visualChildren.Count - 1; foreach (IRenderElementFactory factory in visualRenderElements.Keys) { visualRenderElements[factory].InsertChild(renderChildIndex, child.GetRenderElement(factory)); } }
public void AddVisualChild(Visual child) { if (child.VisualParent == this) { return; } if (child.VisualParent != null) { child.VisualParent.RemoveVisualChild(child); } child.VisualParent = this; visualChildren.Add(child); int renderChildIndex = visualChildren.Count - 1; if (visualRenderElement != null) { visualRenderElement.InsertChild(renderChildrenOffset + renderChildIndex, child.GetRenderElement(renderElementFactory)); } InvalidateHitTestBounds(); }