To create an intuitive GUI, it’s time to add the controls to your blank WPF form. There are two ways you can add these controls, and those are as follows:
Adding Controls using Drag and Drop #
While you are editing the form in the designer, you can drag new controls onto the form.
The control will be inserted inside the control you drop it in.
- Select the tool you want to add from the TOOLBOX in the sidebar.
- Drag the tool to your blank form, and you will be able to see its addition there. You can make further edits on it from the form.
Inserting a control within a control #
The process is simple. Drag the control and drop it within the control you would like inside. The rest will be handled automatically.
![](http://i2.wp.com/poshgui.com/wp-content/uploads/2021/02/wpf-adding-controls.gif)
Click to image to enlarge it
Adding Controls Using XAML Panel #
- Navigate to the XAML Panel.
- Write the XAML definition of the tool you want to add there.
![](http://i2.wp.com/poshgui.com/wp-content/uploads/2021/02/wp-adding-controls-xaml.gif)
Click to image to enlarge it
Inserting a control within a control #
For inserting the control within another through XAML, write the XAML definition of that particular element within the opening and closing of the parent control.