Hi Community,
If you've landed on this item, you can resolve the issue by using AddScoped (instead of AddSingleton or AddTransient).
For example:
public static MauiAppBuilder RegisterViews(this MauiAppBuilder mauiAppBuilder)
{
// These may try to instantiate objects in the XAML too soon, before MauiApplication.Current is available
// mauiAppBuilder.Services.AddSingleton<MyDataGridPage>();
// mauiAppBuilder.Services.AddTransient<MyDataGridPage>();
// Solution
mauiAppBuilder.Services.AddScoped<MyDataGridPage>();
return mauiAppBuilder;
}Regards,
Lance | Manager Technical Support
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.