Adjustable timing - .NET MAUI
In MAUI, the SnackBar
view from the MAUI.CommunityToolkit
is often used to display temporary messages. However, the display duration might be too short for people to read or hear the message.
When using SnackBar
, set the Duration
to TimeSpan.MaxValue
. Alternatively, use the DisplayAlert
method to show an alert instead.
Also, make sure that the use of time limits, such as those set with Timer
, can be extended.
var snackbar = Snackbar.Make("Appt",
() =>
{
//Apply any logic
},
"Close",
TimeSpan.MaxValue);
await snackbar.Show();