Adding templates
We will now be adding five different templates, each corresponding to a specific message type that the app either sends or receives. Each of these templates goes under the <!-- Resources go here later on --> comment from the code snippet in the previous section.
We will not be explaining each of these templates step by step, since the XAML that they contain should be starting to feel familiar at this point.
Each template starts the same way: the root element is a DataTemplate with a name set. The name is important because we will be referencing it in code very soon. The first child of the DataTemplate is always ViewCell with the IsEnabled property set to false to avoid the user being able to interact with the content. We ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access