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.
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.
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.