Install and initialize the .NET MAUI Markup Community Toolkit
mainTo use the toolkit in your .NET MAUI application, you must initialize it in your MauiProgram.cs file by calling the UseMauiCommunityToolkitMarkup() extension method on the MauiAppBuilder.
using CommunityToolkit.Maui.Markup;
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// Initialise the toolkit
builder.UseMauiApp<App>().UseMauiCommunityToolkitMarkup();
// the rest of your logic...
}