menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RibbonDropDownButton - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class RibbonDropDownButton

    Represent a drop down button that is used in a SfRibbon control.

    Inheritance
    System.Object
    RibbonDropDownButton
    Implements
    IRibbonElement
    IRibbonItem
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Ribbon
    Assembly: Syncfusion.Ribbon.WinUI.dll
    Syntax
    public class RibbonDropDownButton : Button, IRibbonElement, IRibbonItem, IDisposable
    Remarks

    The RibbonDropDownButton control displays in different ActiveSizeMode variations such as large, medium, and small, and with no images.

    Examples
    <ribbon:RibbonDropDownButton Content="Paste"
                                 SizeMode="Small">
       <ribbon:RibbonDropDownButton.Icon>
           <SymbolIcon Symbol="Paste" />
       </ribbon:RibbonDropDownButton.Icon>
       <ribbon:RibbonDropDownButton.Flyout>
            <MenuFlyout>
                <MenuFlyoutItem Text="Paste Special" />
                <MenuFlyoutItem Text="Set Default Paste" />
            </MenuFlyout>
       </ribbon:RibbonDropDownButton.Flyout>
    </ribbon:RibbonDropDownButton>

    Constructors

    RibbonDropDownButton()

    Initializes a new instance of the RibbonDropDownButton class.

    Declaration
    public RibbonDropDownButton()

    Fields

    AllowedSizeModesProperty

    Identifies the AllowedSizeModes property.

    Declaration
    public static readonly DependencyProperty AllowedSizeModesProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    DisplayOptionsProperty

    Identifies the DisplayOptions property.

    Declaration
    public static readonly DependencyProperty DisplayOptionsProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    IconProperty

    Identifies the Icon dependency property.

    Declaration
    public static readonly DependencyProperty IconProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    ScreenTipProperty

    Identifies the ScreenTip property.

    Declaration
    public static readonly DependencyProperty ScreenTipProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    AllowedSizeModes

    Gets or sets the size mode options for ribbon element. Using any of these options, the ribbon element gets arranged when resizing the ribbon.

    Declaration
    public RibbonElementSizeModes AllowedSizeModes { get; set; }
    Property Value
    Type Description
    RibbonElementSizeModes

    The default value is Large | Normal | Small. Fields:

    EnumerationDescription
    SmallDisplays only the Image.
    NormalDisplays image along with the content in Horizontal arrangement.
    LargeDisplays image along with the content in Vertical arrangement.

    DisplayOptions

    Gets or sets the way that the ribbon items are displayed in different LayoutModeOptions.

    Declaration
    public DisplayOptions DisplayOptions { get; set; }
    Property Value
    Type Description
    DisplayOptions

    The default value is Normal | Simplified. Fields:

    EnumerationDescription
    NormalThe IRibbonItem gets displayed when SfRibbon is in Normal.
    SimplifiedThe IRibbonItem gets displayed when SfRibbon is in Simplified.
    OverflowThe IRibbonItem gets displayed in overflow menu when SfRibbon is in Simplified.

    Icon

    Gets or sets an icon that appears in a RibbonDropDownButton.

    Declaration
    public IconElement Icon { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Controls.IconElement

    An icon that appears in a RibbonDropDownButton. The default value is null.

    Examples
    <ribbon:RibbonDropDownButton Content="Paste"
                                 SizeMode="Small">
       <ribbon:RibbonDropDownButton.Icon>
           <SymbolIcon Symbol="Paste" />
       </ribbon:RibbonDropDownButton.Icon>
       <ribbon:RibbonDropDownButton.Flyout>
            <MenuFlyout>
                <MenuFlyoutItem Text="Paste Special" />
                <MenuFlyoutItem Text="Set Default Paste" />
            </MenuFlyout>
       </ribbon:RibbonDropDownButton.Flyout>
    </ribbon:RibbonDropDownButton>
    
    <ribbon:RibbonDropDownButton Content="Paste"
                                 SizeMode="Normal">
       <ribbon:RibbonDropDownButton.Icon>
           <FontIcon FontFamily="Segoe MDL2 Assets"
                     FontSize="16"
                     Glyph="&#xED25;" />
       </ribbon:RibbonDropDownButton.Icon>
       <ribbon:RibbonDropDownButton.Flyout>
            <MenuFlyout>
                <MenuFlyoutItem Text="Paste Special" />
                <MenuFlyoutItem Text="Set Default Paste" />
            </MenuFlyout>
       </ribbon:RibbonDropDownButton.Flyout>
    </ribbon:RibbonDropDownButton>
    
    <ribbon:RibbonDropDownButton Content="Paste"
                                 SizeMode="Large">
       <ribbon:RibbonDropDownButton.Icon>
           <BitmapIcon UriSource="ms-appx:///Assets/Paste.png" />
       </ribbon:RibbonDropDownButton.Icon>
       <ribbon:RibbonDropDownButton.Flyout>
            <MenuFlyout>
                <MenuFlyoutItem Text="Paste Special" />
                <MenuFlyoutItem Text="Set Default Paste" />
            </MenuFlyout>
       </ribbon:RibbonDropDownButton.Flyout>
    </ribbon:RibbonDropDownButton>

    ScreenTip

    Gets or sets the ScreenTip that is used to show a pop-up window when the pointer hovers over a ribbon item to provide details about its functionality.

    Declaration
    public ScreenTip ScreenTip { get; set; }
    Property Value
    Type Description
    ScreenTip

    The default is null. 

    Examples
    <ribbon:RibbonDropDownButton x:Name="selectAllButton"
                                   Content="Select"
                                   Icon="SelectAll"
                                   AllowedSizeModes="Large">
        <ribbon:RibbonDropDownButton.Flyout>
            <MenuFlyout>
                <MenuFlyoutItem Icon="SelectAll" Text="Select All" />
                <MenuFlyoutItem Icon = "SelectAll" Text="Select Objects" />
                <MenuFlyoutItem Icon = "ClearSelection" Text="Selection Pane" />
            </MenuFlyout>
        </ribbon:RibbonDropDownButton.Flyout>
        <ribbon:RibbonDropDownButton.ScreenTip>
              <ribbon:ScreenTip Title ="Select" Content="Select text or object in your document."  />
        </ribbon:RibbonDropDownButton.ScreenTip>                          
    </ribbon:RibbonDropDownButton>

    Methods

    Dispose()

    Release the unmanaged resources of RibbonDropDownButton.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Release the unmanaged resources of RibbonDropDownButton.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    OnApplyTemplate()

    Contains the template logic of RibbonDropDownButton.

    Declaration
    protected override void OnApplyTemplate()

    OnCreateAutomationPeer()

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type
    Microsoft.UI.Xaml.Automation.Peers.AutomationPeer

    Explicit Interface Implementations

    IRibbonElement.ActiveSizeMode

    Gets or sets the current SizeMode value of ribbon item which represent the how the image and content of ribbon items get arranged.

    Declaration
    SizeMode IRibbonElement.ActiveSizeMode { get; set; }
    Returns
    Type Description
    SizeMode

    Small mode arrange the ribbon item only with image, Normal mode arrange the ribbon item with image and content in horizontal layout, where in Large mode arrange the ribbon with image and content in vertical layout. The default value is Normal.

    IRibbonItem.Clone()

    This method helps to clone the RibbonDropDownButton

    Declaration
    FrameworkElement IRibbonItem.Clone()
    Returns
    Type
    Microsoft.UI.Xaml.FrameworkElement

    Implements

    IRibbonElement
    IRibbonItem
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved