-
Book Overview & Buying
-
Table Of Contents
GUI Programming with C#
By :
The GridView control in WinUI 3 provides a powerful way to display data in a grid layout with multiple columns, offering logical content divisions. This makes it especially useful for presenting structured data such as product catalogs, image galleries, or course listings. In this example, we will implement a Favorite Course Selector app, displaying a grid of favorite courses and allowing the user to select one. Each course will be visually represented as an individual item within the grid.
The first element in our layout is a TextBlock that displays the Favorite Course Selector title. This title is formatted to be visually prominent, with a font size of 32, bold weight, and the color blue (#182980). The HorizontalAlignment="Center" property ensures that the title is centered horizontally in the application window. A margin is added below the title to provide some spacing between the title and the following content.
Next, we define the GridView, which will...