XAML basics
It's time to start building the main screen of the My Media Collection application. The focal point of the application will be the media items in the collection. To display that list, we are going to need a few things, as follows:
- A
Model
class that defines an item in the collection - Some code to bind the collection of items to the UI
- A XAML control to display the items
Building the model
We will start by building the model for the My Media Collection application. A model defines an entity and its attributes. Earlier in the chapter, we discussed some of the items' attributes we want to display in the UI. In order to display and (eventually) persist this information, we must create the model.
The initial version of our model will consist of two enums (ItemType
and LocationType
) in an Enums
folder and two classes (Medium
and MediaItem
) in a Model
folder, as illustrated in the following screenshot: