Continuing from my last post abut how to create a minimal UWP app in C#, this one takes a closer look at what actually happens under the hood when the app interacts with the Windows Runtime (WinRT) and how you can interact with WinRT yourself in a native way without using any language projections.
The introduction of Windows Template Studio makes it easy to set up a well-formed Universal Windows Platform (UWP) app that implements the (Model-View-View Model) MVVM design pattern according to best practices in no time.
This kind of wizard-based experiences may be appealing to some developers, but in this post I will show how you can create a minimal UWP app from scratch without using any wizards nor auto-generated code.
In WPF the use of implicit data templates without an
x:Key makes it easy to associate a template with a particular type of object. You just set the
DataType property of the
DataTemplate to the corresponding type and the template is then applied automatically to all instances of that particular type.
The Universal Windows Platform (UWP) however has no concept of implicit data templates. Each
DataTemplate that you define in a UWP app must have an
x:Key attribute and it must be set to a
Setting the SelectionMode property of a ListView control to Multiple (Windows.UI.Xaml.Controls.ListViewSelectionMode.Multiple) in a Universal Windows Platform (UWP) app enables you to select several items by checking an automatically generated CheckBox element for each item that you want to select: