From 64fac8a05906f45753df0dcf0bf3b3d170facd00 Mon Sep 17 00:00:00 2001 From: Chester Liu <4710575+skyline75489@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:11:58 +0800 Subject: [PATCH] toast --- .../csharp/GennyMaui/GennyMaui/ViewModels/LoadableModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/csharp/GennyMaui/GennyMaui/ViewModels/LoadableModel.cs b/examples/csharp/GennyMaui/GennyMaui/ViewModels/LoadableModel.cs index b17daa846..8777092bb 100644 --- a/examples/csharp/GennyMaui/GennyMaui/ViewModels/LoadableModel.cs +++ b/examples/csharp/GennyMaui/GennyMaui/ViewModels/LoadableModel.cs @@ -6,7 +6,7 @@ using System.Text.Json; using CommunityToolkit.Mvvm.Messaging.Messages; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.Maui.Controls; +using CommunityToolkit.Maui.Alerts; namespace GennyMaui.ViewModels { @@ -43,7 +43,7 @@ private async Task OpenModelAsync() } else { - await Application.Current.MainPage.DisplayAlert("Folder Open Error", result.Exception.Message, "OK"); + Toast.Make("Folder Open Error: " + result.Exception.Message); } #endif }