C#.NET in WPF: How to add a control in a Panel in WPF?

I have a dialog with a panel that I want my user controls to be displayed. How can I add my user control in the panel in WPF?

users = new
AdminUsers();

stackPanel1.Children.Add(users);

The AdminUsers is a usercontrol that I created. Then I drag and drop a panel into my form. To add my user control to the panel I use the property Children from panel to add your user control.

That's it!

Comments

Popular posts from this blog

Digital Logic

Visual Studio 2008 MFC: How to embed a dialog to a dialog

How to statically link applications to wxWidgets via Visual Studio 2008 and in Linux