Class DropDownMenuItem
Represents the DropDownMenu Item
Inheritance
Implements
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
[SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/VS2010Style.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/BlendStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.ShinyRed, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/ShinyRedStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.ShinyBlue, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/ShinyBlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Default, Type = typeof(DropDownMenuItem), XamlResource = "/Syncfusion.Shared.WPF;component/Controls/ButtonControls/DropDownButton/Themes/DropDownButton.xaml")]
[SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/MetroStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/TransparentStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(DropDownMenuItem), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007SilverStyle.xaml")]
public class DropDownMenuItem : HeaderedItemsControl, ICommandSource, IDisposable
Constructors
DropDownMenuItem()
Initializes a new instance of the DropDownMenuItem class.
Declaration
public DropDownMenuItem()
Fields
CommandParameterProperty
Using a DependencyProperty as the backing store for CommandParameter.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CommandProperty
Using a DependencyProperty as the backing store for Command.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CommandTargetProperty
Using a DependencyProperty as the backing store for CommandTarget.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HasItemsProperty
Using a DependencyProperty as the backing store for HasItems.
Declaration
public static readonly DependencyProperty HasItemsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconProperty
Using a DependencyProperty as the backing store for Icon.
Declaration
public static readonly DependencyProperty IconProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconSizeProperty
Using a DependencyProperty as the backing store for IconSize.
Declaration
public static readonly DependencyProperty IconSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsCheckableProperty
Using a DependencyProperty as the backing store for IsCheckable.
Declaration
public static readonly DependencyProperty IsCheckableProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsCheckedProperty
Using a DependencyProperty as the backing store for IsChecked.
Declaration
public static readonly DependencyProperty IsCheckedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsPressedProperty
Using a DependencyProperty as the backing store for Ispressed.
Declaration
public static readonly DependencyProperty IsPressedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
Command
Gets or sets the command.
Declaration
public ICommand Command { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Input.ICommand | The command.The defult value isfalse |
CommandParameter
Gets or sets the command parameter.
Declaration
public object CommandParameter { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The command parameter.The defult value isnull |
CommandTarget
Get or Set CommandTarget
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.IInputElement | The defult value isnull |
HasItems
Gets or sets a value indicating whether this instance has items.
Declaration
public bool HasItems { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Icon
Gets or sets the icon.
Declaration
public object Icon { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The icon. |
IconSize
Gets or sets the icon size
Declaration
public Size IconSize { get; set; }
Property Value
Type |
---|
System.Windows.Size |
IsCheckable
Gets or sets a value indicating whether this instance is checkable.
Declaration
public bool IsCheckable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsChecked
Gets or sets a value indicating whether this instance is checked.
Declaration
public bool IsChecked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsPressed
Gets or sets the ispressed
Declaration
public bool IsPressed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The icon.The defult value is false |
Methods
Dispose()
Dispose
Declaration
public void Dispose()
OnApplyTemplate()
Builds the visual tree for the System.Windows.Controls.HeaderedItemsControl when a new template is applied.
Declaration
public override void OnApplyTemplate()
OnClick()
Called when [click].
Declaration
protected virtual void OnClick()
OnCreateAutomationPeer()
Automation of DropDownmenuitem
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Called when the value of the System.Windows.Controls.ItemsControl.Items property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | A System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data |
OnKeyUp(KeyEventArgs)
Invoked when an unhandled System.Windows.Element.KeyUp routed event is raised on this element.
Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The System.Windows.Input.KeyEventArgs that contains the event data. The event data reports that the key button was realsed. |
OnMouseEnter(MouseEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseEnter routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. Event that occurs when the mouse pointer moves enter this element. |
OnMouseLeave(MouseEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseLeave routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. Event that occurs when the mouse pointer moves leave this element. |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Element.MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Element.MouseLeftButtonUp routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs Event that occurs when the left mouse button is released while the mouse pointer is over this control. |
Events
Click
Occurs when [click].
Declaration
public event RoutedEventHandler Click
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
IsCheckedChanged
Variable to store the ischeck state of drop down menu item
Declaration
public event PropertyChangedCallback IsCheckedChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |