Show Menu
Cheatography

.NET Maui Basics Cheat Sheet (DRAFT) by

A collection of basic .NET maui sample code

This is a draft cheat sheet. It is a work in progress and is not finished yet.

XAML (UI layout):

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyApp.MainPage">
<StackLayout>
<!-- UI Elements go here -->
</StackLayout>
</ContentPage>
Use XAML to design your app’s UI.

Code-B­ehind (C# logic):

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();
    }
}
The logic for how your app behaves is in the .cs file with the same name as your xaml page.