Category / Section
How to change the shape of the BalloonTip in NotifyIcon?
1 min read
NotifyIcon shapes can be changed as Balloon, Rectangle, Rounded Rectangle Shapes by using the BalloonTipShapes Property.
The same has been explained in the following code example.
XAML
//Changes the shape of the Balloon Tip in Notify Icon <Window x:Class="ColorPickerPallette.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> <Button x:Name="Button1" Content="Notify Show" Click="Button1_Click" Width="100" Height="70"></Button> <syncfusion:NotifyIcon x:Name="NotifyIcon" BalloonTipShape="RoundedRectangle" Background="AliceBlue" BalloonTipText="Custom NotifyIcon" BalloonTipIcon="Info" ShowBalloonTipTime="500" HideBalloonTipTime="1000"></syncfusion:NotifyIcon> </Grid> </Window>
C#
//Changes the shape of the BallonTip in NotifyIcon namespace NotifyIcon { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { NotifyIcon.BalloonTipShape = BalloonTipShapes.Balloon; NotifyIcon.BalloonTipIcon = BalloonTipIcon.Info; NotifyIcon.BalloonTipText = "Custom Notify Icon"; NotifyIcon.ShowBalloonTip(100); } } }
Output
The following screenshots show the different shapes of the NotifyIcon.
Figure 1: Balloon Shape
Figure 2: Rectangle Shape
Figure 3: Rounded Rectangle Shape