NotifyIconService.Icon Property
In This Article
Gets or sets a value specifying the tray icon’s image. This is a dependency property.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public ImageSource Icon { get; set; }
#Property Value
Type | Description |
---|---|
Image |
A value specifying the tray icon’s image. |
#Remarks
You can display the .ico, .png or .svg files as the tray icon’s image.
The following code snippet describes how to specify a tray’s image:
<dxmvvm:Interaction.Behaviors>
<dx:NotifyIconService LeftClickCommand="{Binding DoIconLeftActionCommand}" Icon="demoicon.ico" Tooltip="{Binding ElementName=textBox, Path=Text}">
<dx:NotifyIconService.States>
<dx:NotifyIconState Name="ico" Icon="statistics.ico"/>
<dx:NotifyIconState Name="png" Icon="{dx:DXImage Image=Apply_16x16.png}"/>
<dx:NotifyIconState Name="svg" Icon="{dx:SvgImageSource Uri=add.svg}"/>
</dx:NotifyIconService.States>
<dxb:PopupMenu>
<dxb:BarButtonItem Content="Ico" Command="{Binding IcoCommand}" />
<dxb:BarButtonItem Content="Png" Command="{Binding PngCommand}" />
<dxb:BarButtonItem Content="Svg" Command="{Binding SvgCommand}" />
</dxb:PopupMenu>
</dx:NotifyIconService>
</dxmvvm:Interaction.Behaviors>
See Also