在xaml.cs方面,它很容易实现,点击一下按钮,我想要一个自定义Fancyballoon
来显示和显示文本,持续4秒。我想把它变成MVVM,我如何绑定它?我用它来帮助NotifyIcon
xaml.cs方
private void Button_Click_1(object sender, RoutedEventArgs e)
{
FancyBalloon balloon = new FancyBalloon();
balloon.BalloonText = "Hello World";
MyNotifyIcon.ShowCustomBalloon(balloon, PopupAnimation.Slide, 4000);
}
XAML方:
<tb:TaskbarIcon x:Name="MyNotifyIcon" />