绑定到NotifyIcon气球

时间:2014-03-14 20:47:02

标签: c# xaml

在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"  />

0 个答案:

没有答案