Class DropDownButton
Represents DropDownButton control.
Inherited Members
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
[SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF;component/Framework/Ribbon/Themes/Office2007BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2007BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2007SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2003, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2003Style.xaml")]
[SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/BlendStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.ShinyRed, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/ShinyRedStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.ShinyBlue, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/ShinyBlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Default, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF;component/Framework/Ribbon/Themes/Generic.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2010BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2010BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2010SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/VS2010Style.xaml")]
[SkinType(SkinVisualStyle = Skin.SyncOrange, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/SyncOrangeStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/MetroStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/TransparentStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2013, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF.Classic;component/Framework/Ribbon/Themes/Office2013Style.xaml")]
[SkinType(SkinVisualStyle = Skin.Windows8, Type = typeof(DropDownButton), XamlResource = "/Syncfusion.Tools.WPF;component/Framework/Ribbon/Themes/Windows8Style.xaml")]
public class DropDownButton : RibbonItemsControl, ICollapsable, IRibbonControl, IDisposable
Remarks
DropDownButton class represents a control that can display child UIElements in a dropdown popup.
Examples
This example shows how to create a DropDownButton in XAML.
<ribbon:DropDownButton SmallIcon="SampleImages/ChangeCase16.png">
<ribbon:RibbonMenuItem Header="Sentence case"/>
<ribbon:RibbonMenuItem Header="lowercase"/>
<ribbon:RibbonMenuItem Header="UPPERCASE"/>
<ribbon:RibbonMenuItem Header="Capitalize Each Word"/>
<ribbon:RibbonMenuItem Header="tOOGLE cASE"/>
</ribbon:DropDownButton>
This example shows how to create a DropDownButton in C#.
DropDownButton button = new DropDownButton();
RibbonMenuItem item = new RibbonMenuItem();
button.Items.Add(item);
stackPanel.Children.Add(button);
Constructors
DropDownButton()
Initializes a new instance of the DropDownButton class.
Declaration
public DropDownButton()
Fields
IsGroupProperty
Defines IsGrouped dependency property.
Declaration
public static readonly DependencyProperty IsGroupProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsPressedProperty
Identifies when button is pressed. This is a dependency property.
Declaration
public static readonly DependencyProperty IsPressedProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsPressedPropertyKey
Key through which IsPressed property can be changed. This is a dependency property key.
Declaration
protected static readonly DependencyPropertyKey IsPressedPropertyKey
Field Value
| Type |
|---|
| System.Windows.DependencyPropertyKey |
PathGeometryProperty
Defines path which is contained in toggle button. This is a dependency property.
Declaration
public static readonly DependencyProperty PathGeometryProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
ToggleButtonToolTipProperty
Defines tooltip for toggle button which is contained in large size form dropdown . This is a dependency property.
Declaration
public static readonly DependencyProperty ToggleButtonToolTipProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
IsGroup
Gets or sets a value indicating whether the user can add child items in QAT using right click. If true, user can not add its child as QAT item. This is a dependency property.
Declaration
public bool IsGroup { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsPressed
Gets a value indicating whether this button is pressed.
Declaration
public bool IsPressed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
PathGeometry
Gets or sets path which is contained in toggle button.
Declaration
public Geometry PathGeometry { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Media.Geometry | Type: System.Windows.Media.Geometry Geometry used in bottom part of the DropDownButton. |
ToggleButtonToolTip
Gets or sets tooltip for toggle button which is available at bottom part of large size form.
Declaration
public object ToggleButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | Type: System.Object Object to display as a tooltip in bottom part of the DropDownButton. |
Methods
Dispose()
Dispose all used objects
Declaration
public void Dispose()
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
| Type | Description |
|---|---|
| System.Windows.DependencyObject | The element that is used to display the given item. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | The item to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the item is (or is eligible to be) its own container; otherwise, false. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
Overrides
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
| Type | Description |
|---|---|
| System.Windows.Automation.Peers.AutomationPeer | The type-specific AutomationPeer implementation. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled Keyboard.GotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyboardFocusChangedEventArgs | e | The event data |
OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs)
Invoked when DropDown open changed.
Declaration
protected override void OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | The event data |
Overrides
OnIsPressedChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsPressedChanged event.
Declaration
protected virtual void OnIsPressedChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the System.Windows.Controls.ItemsControl.Items property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Information about the change. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | e | The event data |
Overrides
OnMouseLeave(MouseEventArgs)
Provides class handling for the OnMouseLeave routed event that occurs when a mouse is released inside this element.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | The event data. |
OnMouseRightButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseRightButtonUp�routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseRightButtonUp(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 right mouse button was released. |
Overrides
OnPathGeometryChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises PathGeometryChanged event.
Declaration
protected virtual void OnPathGeometryChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnStylusSystemGesture(StylusSystemGestureEventArgs)
Invoked when an unhandled Stylus.StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnStylusSystemGesture(StylusSystemGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.StylusSystemGestureEventArgs | e | The event data |
Overrides
OnTouchUp(TouchEventArgs)
Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Declaration
protected override void OnTouchUp(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.TouchEventArgs | e | The event data |
Overrides
SetIsPressed(Boolean)
Sets IsPressed dependency property.
Declaration
protected void SetIsPressed(bool pressed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | pressed | Value which should be set. |
Events
IsPressedChanged
Event that is raised when IsPressed property is changed.
Declaration
public event PropertyChangedCallback IsPressedChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
PathGeometryChanged
Event that is raised when PathGeometry property is changed.
Declaration
public event PropertyChangedCallback PathGeometryChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |