Here are the examples of the csharp api class ComponentFactory.Krypton.Toolkit.CommonHelper.RemoveControlFromParent(System.Windows.Forms.Control) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
Project: Krypton
Source File: CommonHelper.cs
Source File: CommonHelper.cs
public static void AddControlToParent(Control parent, Control c) { Debug.Assert(parent != null); Debug.Assert(c != null); // If the control is already inside a control collection, then remove it if (c.Parent != null) RemoveControlFromParent(c); // If the control collection is one of our internal collections... if (parent.Controls is KryptonControlCollection) { // Then must use the internal method for adding a new instance KryptonControlCollection cc = (KryptonControlCollection)parent.Controls; cc.AddInternal(c); } else { // Inside a standard collection, add it the usual way parent.Controls.Add(c); } }