DropDownButton Class

Namespace
MahApps.Metro.Controls
Interfaces
  • ICommandSource
Base Types
  • ItemsControl
graph BT Type-->Base0["ItemsControl"] Type-.->Interface0["ICommandSource"] Type["DropDownButton"] class Type type-node

Syntax

[ContentProperty(nameof(ItemsSource))]
[TemplatePart(Name = "PART_Button", Type = typeof(Button))]
[TemplatePart(Name = "PART_ButtonContent", Type = typeof(ContentControl))]
[TemplatePart(Name = "PART_Menu", Type = typeof(ContextMenu))]
[StyleTypedProperty(Property = nameof(ButtonStyle), StyleTargetType = typeof(Button))]
[StyleTypedProperty(Property = nameof(MenuStyle), StyleTargetType = typeof(ContextMenu))]
public class DropDownButton : ItemsControl, ICommandSource

Attributes

Type Description
ContentProperty
TemplatePart
TemplatePart
TemplatePart
StyleTypedProperty
StyleTypedProperty

Events

Name Type Summary
Click RoutedEventHandler

Fields

Name Constant Value Summary
ArrowBrushProperty
Identifies the ArrowBrush dependency property.
static
ArrowMouseOverBrushProperty
Identifies the ArrowMouseOverBrush dependency property.
static
ArrowPressedBrushProperty
Identifies the ArrowPressedBrush dependency property.
static
ArrowVisibilityProperty
Identifies the ArrowVisibility dependency property.
static
ButtonStyleProperty
Identifies the ButtonStyle dependency property.
static
ClickEvent
static
CommandParameterProperty
Identifies the CommandParameter dependency property.
static
CommandProperty
Identifies the Command dependency property.
static
CommandTargetProperty
Identifies the CommandTarget dependency property.
static
ContentProperty
Identifies the Content dependency property.
static
ContentStringFormatProperty
Identifies the ContentStringFormat dependency property.
static
ContentTemplateProperty
Identifies the ContentTemplate dependency property.
static
ContentTemplateSelectorProperty
Identifies the ContentTemplateSelector dependency property.
static
ExtraTagProperty
Identifies the ExtraTag dependency property.
static
IconProperty
Identifies the Icon dependency property.
static
IconTemplateProperty
Identifies the IconTemplate dependency property.
static
IsExpandedProperty
Identifies the IsExpanded dependency property.
static
MenuStyleProperty
Identifies the MenuStyle dependency property.
static
OrientationProperty
Identifies the Orientation dependency property.
static

Properties

Name Value Summary
ArrowBrush Brush
Gets or sets the foreground brush for the button arrow icon.
ArrowMouseOverBrush Brush
Gets or sets the foreground brush of the button arrow icon if the mouse is over the drop down button.
ArrowPressedBrush Brush
Gets or sets the foreground brush of the button arrow icon if the arrow button is pressed.
ArrowVisibility Visibility
Gets or sets the visibility of the button arrow icon.
ButtonStyle Style
Gets or sets the button content style.
Command ICommand
Gets or sets the command to invoke when the content button is pressed.
CommandParameter object
Gets or sets the parameter to pass to the command property.
CommandTarget IInputElement
Gets or sets the element on which to raise the specified command.
Content object
Gets or sets the content of this control.
ContentStringFormat string
Gets or sets a composite string that specifies how to format the content property if it is displayed as a string.
ContentTemplate DataTemplate
Gets or sets the data template used to display the content of the DropDownButton.
ContentTemplateSelector DataTemplateSelector
Gets or sets a template selector that enables an application writer to provide custom template-selection logic.
ExtraTag object
Gets or sets an extra tag.
Icon object
Gets or sets the content for the icon part.
IconTemplate DataTemplate
Gets or sets the DataTemplate for the icon part.
IsEnabledCore bool
IsExpanded bool
Whether or not the "popup" menu for this control is currently open
MenuStyle Style
Gets or sets the "popup" menu style.
Orientation Orientation
Gets or sets the orientation of children stacking.

Methods

Name Value Summary
OnApplyTemplate() void
OnItemsChanged(NotifyCollectionChangedEventArgs) void
Invoked when the System.Windows.Controls.ItemsControl.Items property changes.
OnMouseRightButtonUp(MouseButtonEventArgs) void
SetContextMenuPlacementTarget(ContextMenu) void