Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

NotifyIconService.Icon Property

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
ImageSource

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