You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to set a TimeSpan on a Flyout that would make it auto close after that amount of time. With this feature flyouts could be used for notifications more easily.
The text was updated successfully, but these errors were encountered:
If you're using the Flyout for notifications, you're probably using a method that sets the notification message and opens the Flyout.
I've been using this method in another (private) project for displaying a status to the user; you might find it helpful. Status is the Flyout that is being used as a notification. I call this every time I want to display a notification.
using System.Windows.Media.Animation;publicvoidShowStatus(stringstatus,doubleduration=2.5){
Status.Header =status;BooleanAnimationUsingKeyFramesstatusAnimation=new BooleanAnimationUsingKeyFrames();
statusAnimation.KeyFrames.Add(new DiscreteBooleanKeyFrame(){KeyTime= TimeSpan.FromSeconds(0),Value=true});
statusAnimation.KeyFrames.Add(new DiscreteBooleanKeyFrame(){KeyTime= TimeSpan.FromSeconds(duration+0.5),Value=false});//That 0.5 is for the Show animation
Status.BeginAnimation(MahApps.Metro.Controls.Flyout.IsOpenProperty, statusAnimation);}
It would be nice to be able to set a
TimeSpan
on aFlyout
that would make it auto close after that amount of time. With this feature flyouts could be used for notifications more easily.The text was updated successfully, but these errors were encountered: