Adding Controls to WPF Windows

You can add controls to a WPF Window by using the Toolbox.

When you build a window, place controls in the window to request and receive information from the user and to present information to the user.

Note: Although you can add, edit, or remove controls using the XAML view, it is not recommended because it may cause object corruption.
  1. In the Toolbox, select the control you want to insert.
  2. In the Layout view, specify the location of the control.
After you insert the control, you can size it, move it, define its appearance and behavior, and create scripts for its events.