Class CustomMenuItem
Represents a custom menu item class.
Inheritance
Implements
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
public class CustomMenuItem : MenuItem, IDisposable
Constructors
CustomMenuItem()
Initializes a new instance of the CustomMenuItem class.
Declaration
public CustomMenuItem()
Fields
HeaderInIconAreaProperty
Identifies the HeaderInIconAreaProperty dependency property.
Declaration
public static readonly DependencyProperty HeaderInIconAreaProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconTemplateProperty
Identifies the IconTemplateProperty dependency property.
Declaration
public static DependencyProperty IconTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsSeparatorProperty
Declaration
public static readonly DependencyProperty IsSeparatorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
HeaderInIconArea
Gets or sets a value indicating whether the HeaderInIconArea dependency property.
Declaration
public bool HeaderInIconArea { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
This property determines what will be shown in the left area of menu item - icon or header. If it set to true - header will be displayed instead of icon, otherwise - icon will be displayed (but only for checked item).
IconTemplate
Gets or sets the value of the IconTemplateProperty dependency property.
Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
Remarks
This property is used to get / set data template for the icon.
IsSeparator
Gets or sets a value indicating whether the menu item can act as a separator or CustomMenuItem.
Declaration
public bool IsSeparator { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Dispose()
To clear unused objects
Declaration
public void Dispose()
OnChecked(RoutedEventArgs)
Called when the MenuItem Checked CustomMenuItem.
Declaration
protected override void OnChecked(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e |
OnHeaderChanged(Object, Object)
Called when the Header property of a CustomMenuItem changes.
Declaration
protected override void OnHeaderChanged(object oldHeader, object newHeader)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldHeader | The old value of the |
System.Object | newHeader | The new value of the |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Called when IsTouchEnabled property changes
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changed details |
Events
HeaderInIconAreaChanged
Event that is raised when HeaderInIconArea property is changed.
Declaration
public event PropertyChangedCallback HeaderInIconAreaChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |