Adding the View for the UWP project

Add a button to the FirstView.xaml in the Views folder of the MvvmCrossDemo.Uwp project and bind the NavToPostListAsyncCommand command of the FirstViewModel.cs, as shown below:

<TextBlock Text="{Binding Greeting}"></TextBlock>
<Button Content="Post List" Command="{Binding NavToPostListAsyncCommand}"></Button>

Create a new Blank Page item called PostListView.xaml to the Views folder in the MvvmCrossDemo.Uwp project. Open PostListView.xaml.cs and change the base class to MvxWindowsPage class, like this:

namespace MvvmCrossDemo.Uwp.Views
public sealed partial class PostListView : MvxWindowsPage
public PostListView()

Open PostListView.xaml and replace the content with the following codes:

Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
xmlns:views="using:MvvmCross.Platforms.Uap.Views" >

Add a ListView control to the root layout and define the item template, like this:

<ListView ItemsSource="{Binding PostList}">
<StackPanel HorizontalAlignment="Stretch">
<TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}"></TextBlock>
<TextBlock Text="{Binding Body}"></TextBlock>

Open the Package.appxmanifest file and select Capabilities tab, and make sure the Internet (Client) option is checked. Here is the result: