The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
UIElementCollection.Add Method (UIElement)
.NET Framework (current version)
PresentationFramework (in PresentationFramework.dll)
public virtual int Add(
The index position of the added element.
The following example uses the Add method to add child content to a parent StackPanel. You do this by using the Children property, which is of type UIElementCollection.
void AddButton(object sender, MouseButtonEventArgs e)
btn = new Button();
btn.Content = "New Button";
Return to top
Available since 3.0