Windows Store MVVM Template


A bare bones starter template for Windows Store 8.1 Projects that Utilizes the Model View View Model Pattern

You can download the template from the Visual Studio Extension Gallery
You can fork or contribute to the template on

Directory #

Here's a breakdown of the directory structure:


Samples #

Binding #

MainView.xaml #

<TextBox Text="{Binding PersonName}" />

MainViewModel.vb #

Private _personName As String
Public Property PersonName As String
        Return _personName
    End Get
    Set(ByVal value As String)
        SetProperty(_personName, value)
    End Set
End Property

MainViewModel.cs #

private string _propertyName;
public string PropertyName {
    get { return _propertyName; }
    set { SetProperty(ref _propertyName, value); }

Commands #

MainView.xaml #

<button content="Say Hello" command="{Binding SayHelloCommand}" />

MainViewModel.vb #

Public ReadOnly Property EnterNameCommand As RelayCommand
        If _enterNameCommand Is Nothing Then
            _enterNameCommand = New RelayCommand(Async Sub() Await EnterName())
        End If
        Return _enterNameCommand
    End Get
End Property

Private Function EnterName() As Task
    'do awaitable stuff here
End Function