Icon Support in WPF Menu (MenuAdv)

6 May 20211 minute to read

MenuItemAdv allows users to display an image on the left of the control. Icon for MenuItemAdv can be set by providing the image source as a value for the Icon property of the MenuItemAdv class.

Use Case Scenarios

MenuAdv helps users to display an image on the left of the control.

Adding the Icon Support to an Application

The Icon support can be added to an application by using the Icon property of MenuItemAdv, as shown in the following code snippet.

  • XAML
  • <shared:MenuAdv x:Name="Menu"/>
    <shared:MenuItemAdv Header="File">
    <shared:MenuItemAdv Header="New">
    <Image Source="/MenuControlDemo;component/Images/NewIcon.jpg"/>
    <shared:MenuItemAdv Header="Copy">
    <Image Source="/MenuControlDemo;component/Images/CopyIcon.jpg"/>
    <shared:MenuItemAdv Header="Cut">
    <Image Source="/MenuControlDemo;component/Images/CutIcon.jpg"/>
    <shared:MenuItemAdv Header="Edit"/>



    The property for the Icon support is described in the following tabulation:

    Property Description Type Data Type
    Icon Gets or sets the Icon of MenuItemAdv. DependencyProperty Object(null)

    WPF Sample Browser-> Tools -> MenuAdv -> MenuAdv Demo