FunctionZero
  • Libraries
    • Maui.MvvmZero
      • Overview
      • Quickstart
      • Walkthrough
        • Create your application
        • Create your ContentPages
        • Create your ViewModels
        • Register your new content
        • Launching our app!
        • Adding Navigation
        • Summary
      • Recommended naming conventions
      • Configuring your root Page
        • Root ContentPage
        • Root NavigationPage
        • Root TabbedPage
        • Root FlyoutPage
      • A note on Singleton vs Transient
      • Recommended base classes for PageViewModels and ViewModels
    • Maui.Controls
      • ExpanderZero
      • FocusScrollZero
      • LabelZero
      • ListViewZero
      • MaskZero
      • MultiViewZero
      • TreeViewZero
    • CommandZero
    • Maui.BindZero
      • Quickstart
      • z:Bind
      • Examples
      • The Great Escape
      • Casting
      • Short Circuit
      • Errors
      • Aliases
      • Value types and Reference types
      • z:Function
      • z:TapTrigger
      • z:EdgeTrigger
      • z:Latch
      • Advanced Usage - Functions, aliases and operator-overloads
    • AnimationZero
    • LocalisationZero
Powered by GitBook
On this page
  1. Libraries
  2. Maui.MvvmZero
  3. Walkthrough

Create your application

PreviousWalkthroughNextCreate your ContentPages

Last updated 1 year ago

Open Visual Studio, or your preferred IDE, and create a new .NET MAUI application. Give it a cool name, or a terrible one if you prefer.

Build and run, just for peace of mind.

Now we're going to remove the Shell navigation and use MvvmZero

Use the Package Manager (right-click on your project in the Solution Explorer) and add the latest FunctionZero.Maui.MvvmZero. Make sure you don't select the !

Remove AppShell.xaml and AppShell.xaml.cs, as well as MainPage.xaml and MainPage.xaml.cs

In App.xaml.cs, replace your constructor with this:

public App()
{
    InitializeComponent();

    MainPage = new ContentPage { Content = new Label { Text = "Temporary ContentPage" } };
}

Build and run. You should see a page with the corresponding Label.

We're now going to prepare some Pages and ViewModels

Xamarin Forms Version
Adding FunctionZero.Maui.MvvmZero