BinaryRibbonDropDownButton
A custom menu item class that acts like a drop down button control in the ribbon window.
public class BinaryRibbonDropDownButton : MenuItem, IBinaryRibbonComponent, IBinaryRibbonContentElementBoundsConfigurable, ICommandSource, IBinaryRibbonKeyTipControl
Inherits from / implements: MenuItem, IBinaryRibbonComponent, IBinaryRibbonContentElementBoundsConfigurable, ICommandSource, IBinaryRibbonKeyTipControl
Members at a glance
BinaryRibbonDropDownButton | Initializes a new instance of the BinaryRibbonDropDownButton class. |
BinaryRibbonTag | Gets or sets a generic tag. |
Content | Gets or sets the content for this control instance. |
CornerRadius | Gets or sets the corner radius. |
DropDownFooterContent | Gets or sets the content of the drop-down footer. |
DropDownFooterDataTemplate | Gets or sets the drop-down footer DataTemplate. |
DropDownHeaderContent | Gets or sets the content of the drop-down header. |
DropDownHeaderDataTemplate | Gets or sets the drop-down header DataTemplate. |
DropDownWidth | Gets or sets the width of the drop-down. |
IsDropDownCurrentlyPressed | Gets or sets a value indicating whether the drop-down is currently pressed. |
LargeImage | Gets or sets the large image. |
MaximumDropDownPanelHeight | Gets or sets the maximum height of the drop-down panel. |
PopupAnimation | Gets or sets the popup animation value for this drop-down button instance. |
PopupPlacement | Gets or sets the popup placement. |
ShowDropDownImage | Gets or sets a value indicating whether to show drop-down image. |
SmallImage | Gets or sets the small image. |
ForcePopupActiveOnMouseUp | Pins the popup open, so that the mouse-up which follows the click that opened it does not immediately dismiss it. |
ForcePopupInactive | Releases the pin put on the popup by ForcePopupActiveOnMouseUp, letting it close again on the next click outside. |
GetContainerForItemOverride | Creates the container that one item is shown in, which for this control is a BinaryRibbonMenuItem. |
IsItemItsOwnContainerOverride | Reports whether an item can be shown as it stands, without being wrapped in a container of its own. |
OnApplyTemplate | Called when the template's tree is generated. |
OnDropDownCurrrentlyPressedChanged | Called when the button goes into or out of its pressed state, which is what opens and closes the drop-down. |
OnKeyDown | Raises the KeyDown event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior. |
OnMouseLeftButtonDown | Raises the MouseLeftButtonDown event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior. |
OnMouseLeftButtonUp | Raises the MouseLeftButtonUp event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior. |
OnPopupClose | Called when this control's drop-down popup closes. Override to react to it without having to attach to the popup yourself. |
OnPopupOpen | Called when this control's drop-down popup opens. Override to react to it without having to attach to the popup yourself. |
SwitchState | Toggles the button between pressed and not pressed, which is how a click opens or closes the drop-down. |
PopupClose | /// Occurs when the drop-down popup is closed. |
PopupOpen | Occurs when the drop-down popup is open. |
ContentProperty | ContentProperty property. |
CornerRadiusProperty | CornerRadiusProperty property. |
DropDownFooterContentProperty | DropDownFooterContentProperty property. |
DropDownFooterDataTemplateProperty | DropDownFooterDataTemplateProperty property. |
DropDownHeaderContentProperty | DropDownHeaderContentProperty property. |
DropDownHeaderDataTemplateProperty | DropDownHeaderDataTemplateProperty property. |
DropDownWidthProperty | DropDownWidthProperty property. |
IsDropDownCurrentlyPressedProperty | IsDropDownCurrentlyPressedProperty property. |
LargeImageProperty | LargeImageProperty property. |
MaximumDropDownPanelHeightProperty | MaximumDropDownPanelHeightProperty property. |
PopupAnimationProperty | PopupAnimationProperty property. |
PopupCloseEvent | PopupCloseEvent routed event. |
PopupOpenEvent | PopupOpenEvent routed event. |
PopupPlacementProperty | PopupPlacementProperty property. |
ShowDropDownImageProperty | ShowDropDownImageProperty property. |
SmallImageProperty | SmallImageProperty property. |
popup | The popup this button drops down. It is filled in once the control template has been applied, so it is null before then. |
Constructors
BinaryRibbonDropDownButton
Initializes a new instance of the BinaryRibbonDropDownButton class.
Properties
BinaryRibbonTag
Gets or sets a generic tag.
Value. The binary ribbon tag.
Content
Gets or sets the content for this control instance.
CornerRadius
Gets or sets the corner radius.
Value. The corner radius.
DropDownHeaderContent
Gets or sets the content of the drop-down header.
DropDownHeaderDataTemplate
Gets or sets the drop-down header DataTemplate.
DropDownWidth
Gets or sets the width of the drop-down.
IsDropDownCurrentlyPressed
Gets or sets a value indicating whether the drop-down is currently pressed.
LargeImage
Gets or sets the large image.
Value. The large image.
MaximumDropDownPanelHeight
Gets or sets the maximum height of the drop-down panel.
PopupAnimation
Gets or sets the popup animation value for this drop-down button instance.
PopupPlacement
Gets or sets the popup placement.
Value. The popup placement.
ShowDropDownImage
Gets or sets a value indicating whether to show drop-down image.
SmallImage
Gets or sets the small image.
Value. The small image.
Methods
ForcePopupActiveOnMouseUp
Pins the popup open, so that the mouse-up which follows the click that opened it does not immediately dismiss it.
ForcePopupInactive
Releases the pin put on the popup by ForcePopupActiveOnMouseUp, letting it close again on the next click outside.
GetContainerForItemOverride
Creates the container that one item is shown in, which for this control is a BinaryRibbonMenuItem.
IsItemItsOwnContainerOverride
Reports whether an item can be shown as it stands, without being wrapped in a container of its own.
OnApplyTemplate
Called when the template's tree is generated.
OnDropDownCurrrentlyPressedChanged
Called when the button goes into or out of its pressed state, which is what opens and closes the drop-down.
- oldValue
- The state it was in.
- newValue
- The state it has moved to.
OnKeyDown
Raises the KeyDown event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseLeftButtonDown
Raises the MouseLeftButtonDown event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseLeftButtonUp
Raises the MouseLeftButtonUp event. BinaryRibbonDropDownButton overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnPopupClose
Called when this control's drop-down popup closes. Override to react to it without having to attach to the popup yourself.
- sender
- The popup.
- e
- Not used.
OnPopupOpen
Called when this control's drop-down popup opens. Override to react to it without having to attach to the popup yourself.
- sender
- The popup.
- e
- Not used.
SwitchState
Toggles the button between pressed and not pressed, which is how a click opens or closes the drop-down.
Events
PopupClose
/// Occurs when the drop-down popup is closed.
PopupOpen
Occurs when the drop-down popup is open.
Fields
ContentProperty
ContentProperty property.
CornerRadiusProperty
CornerRadiusProperty property.
DropDownHeaderContentProperty
DropDownHeaderContentProperty property.
DropDownHeaderDataTemplateProperty
DropDownHeaderDataTemplateProperty property.
DropDownWidthProperty
DropDownWidthProperty property.
IsDropDownCurrentlyPressedProperty
IsDropDownCurrentlyPressedProperty property.
LargeImageProperty
LargeImageProperty property.
MaximumDropDownPanelHeightProperty
MaximumDropDownPanelHeightProperty property.
PopupAnimationProperty
PopupAnimationProperty property.
PopupCloseEvent
PopupCloseEvent routed event.
PopupOpenEvent
PopupOpenEvent routed event.
PopupPlacementProperty
PopupPlacementProperty property.
ShowDropDownImageProperty
ShowDropDownImageProperty property.
SmallImageProperty
SmallImageProperty property.
popup
The popup this button drops down. It is filled in once the control template has been applied, so it is null before then.