Using Grid as a WPF panel

Let's start with the Grid layout panel. It is the most useful panel you will ever use in your application, and is the default panel inserted inside every XAML page when you create a Window, Page, or User Control. You could see that there was a Grid panel inserted when we created our first WPF application. A button control was placed inside it.

The Grid layout control allows you to define the Grid structure to place individual elements in rows and columns structure in a matrix format:

In XAML, you need to design your Grid cells using RowDefinitions and ColumnDefinitions. Each definition group can have multiple definitions. ...

Get Mastering Visual Studio 2017 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.