#64 – Visual Studio Creates XAML for You

When you dbl-click a .xaml file in the Solution Explorer, the WPF designer opens.  You’ll see a split window with Design and XAML tabs.

You make changes on the Design tab by dragging/dropping controls from the toolbox or by selecting objects and making changes in the Properties window.

You make changes on the XAML tab by editing the XAML directly.

Visual Studio keeps the content of these two tabs in synch:

  • When you change layout on the Design tab – Visual Studio creates/change XAML code to match the layout
  • When you change XAML code – Visual Studio updates the layout to match the XAML
Advertisements