Category / Section
How to set the AnimationEffects for NotifyIcon?
1 min read
To set the Animation effect for the Notify Icon, BalloonTipAnimationEffect property can be used. The BallonTipAnimationEffect property contains the different value such as
- Fade
- Custom
- Slide
- Scale
The following code snippet demonstrate how to set the BalloonTipAnimationEffect as Fade. Similarly, the different type of AnimationEffect for NotifyIcon can be set using the BalloonTipAnimationEffect.
XAML:
<Window x:Class="DockingManager_New.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:syncfusion="http://schemas.syncfusion.com/wpf" Title="MainWindow" Height="350" Width="525"> <Grid x:Name="Grid1"> <Button x:Name="Button1" Width="100" Height="23" Click="Button1_Click" Content="ClickToShow"/> <syncfusion:NotifyIcon x:Name="NotifyIcon" BalloonTipText="Custom Notify Icon is Available" BalloonTipTitle="Default NotifyIcon" BalloonTipAnimationEffect="Fade" ShowBalloonTipTime="100" /> </Grid> </Window>
C#:
using Syncfusion.Windows.Tools.Controls; namespace DockingManager_New { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button1_Click(object sender, RoutedEventArgs e) { //The following code shows how to set the AnimationEffect for NotifyIcon NotifyIcon.BalloonTipAnimationEffect = BalloonTipAnimationEffects.Fade; NotifyIcon.BalloonTipTitle = "Default NotifyIcon"; NotifyIcon.BalloonTipText = "Custom Notify Icon is Available"; NotifyIcon.ShowBalloonTip(100);} } }