Creating the page in C#
Before moving on, and to reinforce the fact that anything you can do in XAML you can do in C#, here is the version of LoginPage
that we will be using in Forget Me Not (ForgetMeNotDemo) written in C# (in the repo, this page is called LoginCS
):
using CommunityToolkit.Maui.Markup; using static CommunityToolkit.Maui.Markup.GridRowsColumns; namespace ForgetMeNot.View { class LoginCS : ContentPage { public LoginCS(LoginViewModel viewModel) [1] { BindingContext = viewModel; var activity = new ActivityIndicator() [2] { ...