> For the complete documentation index, see [llms.txt](https://functionzero.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://functionzero.gitbook.io/docs/libraries/maui.mvvmzero/walkthrough/create-your-viewmodels.md).

# Create your ViewModels

First we're going to create a couple of base classes for our PageViewModels and ViewModels. It's not necessary, but it makes life much easier if we later on want to insert our own base class functionality. If you do not wish to do this then you can simply derive your `ViewModel` classes directly from the library implementations (or not - `MvvmZero` does not require you use its base classes)

In your `Mvvm/PageViewModels` folder, add the following `abstract` class:

```csharp
using FunctionZero.Maui.MvvmZero;

namespace MvvmZeroTutorial.Mvvm.PageViewModels
{
    public abstract class BasePageVm : MvvmZeroBasePageVm
    {
    }
}
```

Similarly, in your `Mvvm/ViewModels` folder, add the following `abstract` class:

```csharp
using FunctionZero.Maui.MvvmZero;

namespace MvvmZeroTutorial.Mvvm.ViewModels
{
    public abstract class BaseVm : MvvmZeroBaseVm
    {
    }
}
```

Now we want to create a `ViewModel` for each of the `ContentPages`. In the `Mvvm/PageViewModels` folder, add `ReadyPageVm`

<div align="left"><figure><img src="https://682853853-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEI3OpYcL28jENgdpYmW%2Fuploads%2FQiO8tFfyzEqt0kkcr9CT%2Fimage.png?alt=media&amp;token=a7071f0f-9b4a-4f3f-b829-7b6cf6c366e3" alt=""><figcaption><p>Adding our first <code>ViewModel</code></p></figcaption></figure></div>

Make the class `public` and derive from our base implementation for a `PageViewModel`:

```csharp
namespace MvvmZeroTutorial.Mvvm.PageViewModels
{
    public class ReadyPageVm : BasePageVm
    {
    }
}
```

Repeat the process for `SteadyPageVm`, `GoPageVm` and `DetailPageVm`

And here we are:

<div align="left"><figure><img src="https://682853853-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEI3OpYcL28jENgdpYmW%2Fuploads%2F4vTnMLvnM8SGCiILc58f%2Fimage.png?alt=media&amp;token=f0718a96-d574-415f-b251-bfc38f5036c0" alt=""><figcaption><p>4 <code>ViewModels</code> added to the project</p></figcaption></figure></div>

Next we're going to register our `Pages` and `ViewModels` so they can be presented.
