# Adding the App.xaml and the App.xaml.cs

Create a new Xamarin.Forms Content Page item into the `MvvmCross.Forms.UI` project. Notice that do not select the other file items, as shown below:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQIgfH4Ry0htaPZEJI%2F-LPQIn0Np0RII4-YSgrr%2Fimage.png?alt=media\&token=97632624-f2e3-46d3-9398-7770be6c25d3)

Open this file and replace the content with the below codes:

```markup
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="MvvmCrossDemo.Forms.UI.App">
    <Application.Resources>
    </Application.Resources>
</Application>
```

You can find the sample code here: <https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/Forms/FormsUIContent/App.xaml.pp>.

Open the `App.xaml.cs` file and update the content. The default base class of the `App` class is `ContentPage`, and we need to change it to inherit from the `Xamarin.Forms.Application` class, like this:

```csharp
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace MvvmCrossDemo.Forms.UI
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
        }
    }
}
```

You can find the sample code here: <https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/Forms/FormsUIContent/App.xaml.cs.pp>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yanxiaodi.gitbook.io/xamarin-mvvmcross-handbook/using-mvvmcross-to-create-your-first-xamarin-app/creating-the-xamarin.forms-project/adding-the-app.xaml-and-the-app.xaml.cs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
