menu

Blazor

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

    Show / Hide Table of Contents

    Class RibbonFileMenuSettings

    Gets or sets the settings for the File Menu of the SfRibbon.

    Inheritance
    System.Object
    RibbonFileMenuSettings
    Namespace: Syncfusion.Blazor.Ribbon
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RibbonFileMenuSettings : OwningComponentBase
    Remarks

    This property allows you to customize the appearance and behavior of the File Menu in the ribbon control. You can use this property to define items such as "New," "Open," "Save," and other menu commands that are typically found in a file menu.

    Examples

    Ribbon component with filemenu enabled.

    <SfRibbon ID="default">
    <ChildContent>
        <RibbonFileMenuSettings Visible=true MenuItems="@fileMenuItems"></RibbonFileMenuSettings>
        <RibbonTabs>
            <RibbonTab Header="Home">
                <RibbonGroups>
                    <RibbonGroup HeaderText="Clip">
                        <RibbonCollections>
                            <RibbonCollection>
                                <RibbonItems>
                                    <RibbonItem Type=RibbonItemType.Button>
                                        <RibbonButtonSettings Content="Copy" IconCss="e-icons e-copy"></RibbonButtonSettings>
                                    </RibbonItem>
                                </RibbonItems>
                            </RibbonCollection>
                        </RibbonCollections>
                    </RibbonGroup>
                </RibbonGroups>
            </RibbonTab>
        </RibbonTabs>
    </ChildContent>
    </SfRibbon>
    @code {
            List<MenuItem> fileMenuItems = new List<MenuItem>()
            {
                new MenuItem { Text = "New", IconCss = "e-icons e-file-new", Id = "new" },
                new MenuItem { Text = "Open", IconCss = "e-icons e-folder-open", Id = "open" },
                new MenuItem { Text = "Rename", IconCss = "e-icons e-rename", Id = "rename" },
            };
    }

    Constructors

    RibbonFileMenuSettings()

    Declaration
    public RibbonFileMenuSettings()

    Properties

    AnimationSettings

    Gets or sets the animation settings for the sub menu open/close.

    Declaration
    public MenuAnimationSettings AnimationSettings { get; set; }
    Property Value
    Type Description
    MenuAnimationSettings

    An instance of MenuAnimationSettings representing the animation settings for the sub menu open/close.

    Remarks

    This property allows you to define the animation settings for when sub menus are opened or closed in the component. The MenuAnimationSettings class provides various options to customize the animation, such as duration, effect, and easing.

    FileMenuClosed

    Gets or sets an event callback that is raised after the file menu popup is closed.

    Declaration
    public EventCallback<FileMenuClosedEventArgs> FileMenuClosed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuClosedEventArgs>

    An event handler for the FileMenuClosed event.

    Remarks

    This event allows you to specify a method that will be called after the file menu popup is closed.

    FileMenuClosing

    Gets or sets the event handler that is raised before the file menu is closed.

    Declaration
    public EventCallback<FileMenuCloseEventArgs> FileMenuClosing { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuCloseEventArgs>

    An event handler for the FileMenuClosing event.

    Remarks

    This event allows you to specify a method that will be called before the file menu is closed.

    FileMenuItemRendering

    Gets or sets an event callback that is raised while rendering each file menu item.

    Declaration
    public EventCallback<FileMenuItemRenderEventArgs> FileMenuItemRendering { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuItemRenderEventArgs>

    An event handler for the FileMenuItemRendering event.

    Remarks

    This event allows you to specify a method that will be called during the rendering of each file menu item.

    FileMenuOpened

    Gets or sets an event callback that is raised after the file menu popup is opened.

    Declaration
    public EventCallback<FileMenuOpenedEventArgs> FileMenuOpened { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuOpenedEventArgs>

    An event handler for the FileMenuOpened event.

    Remarks

    This event allows you to specify a method that will be called after the file menu popup is opened.

    FileMenuOpening

    Gets or sets the event handler that is raised before the file menu is opened.

    Declaration
    public EventCallback<FileMenuOpenEventArgs> FileMenuOpening { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuOpenEventArgs>

    An event handler for the FileMenuOpening event.

    Remarks

    This event allows you to specify a method that will be called before the file menu is opened.

    HtmlAttributes

    Specifies additional HTML attributes to be applied to the File menu.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.Object>

    ItemSelecting

    Gets or sets an event callback that is raised while selecting an item in the ribbon menu.

    Declaration
    public EventCallback<FileMenuItemSelectEventArgs> ItemSelecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FileMenuItemSelectEventArgs>

    An event handler for the ItemSelecting event.

    Remarks

    This event allows you to specify a method that will be called when a menu item is being selected in the ribbon menu.

    ItemTemplate

    Gets or sets the custom template for rendering the menu item in the Ribbon component

    Declaration
    public RenderFragment<MenuItem> ItemTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<MenuItem>

    The template content. The default value is null.

    Remarks

    The MenuItem allows you to define a custom template for rendering each menu item. You can use this template to fully customize the appearance and content of menu items within the Ribbon.

    KeyTip

    Gets or sets the key tip text for the file menu tab in the SfRibbon component.

    Declaration
    public string KeyTip { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the key tip text for the file menu tab. Defaults to an empty string.

    Remarks

    The KeyTip property allows you to specify a keyboard shortcut (key tip) for a particular filemenu tab in the SfRibbon component. When key tips are enabled, users can press the associated key combination to quickly open the file menu tab.

    MenuItems

    Gets or sets the menu items for the file menu.

    Declaration
    public List<MenuItem> MenuItems { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<MenuItem>

    A list of MenuItem representing the menu items for the file menu.

    Remarks

    This property allows you to define and customize the items that appear in the file menu of the SfRibbon component. Each item in the list represents a menu option and can be configured with various properties such as text, icon, and action.

    PopupTemplate

    Gets or sets the content for the file menu popup which is rendered instead of the menu items.

    Declaration
    public RenderFragment PopupTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The popup template content. The default value is null.

    Remarks

    You can use this template to fully customize the appearance and custom content for the file menu popup.

    ShowItemOnClick

    Gets or sets a value indicating whether to show the sub menu items on click.

    Declaration
    public bool ShowItemOnClick { get; set; }
    Property Value
    Type Description
    System.Boolean

    A bool value that defaults to false. If set to true, the sub menu items will be shown on click.

    Remarks

    This property controls the visibility behavior of the sub menu items. When set to true, the sub menu items will be displayed when the user clicks on the menu item. When set to false, the sub menu items will be shown on hover.

    Text

    Gets or sets the text to display for the file menu button.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the text to display for the file menu button. The default value is "File".

    Remarks

    This property specifies the text that appears on the file menu button in the component.

    TooltipSettings

    Gets or sets the tooltip for the File menu.

    Declaration
    public RibbonTooltipSettings TooltipSettings { get; set; }
    Property Value
    Type Description
    RibbonTooltipSettings

    An instance of RibbonTooltipSettings representing the tooltip for the File menu.

    Remarks

    The tooltip provides additional information about the File menu when hovered over.

    Visible

    Gets or sets a value indicating whether to show the file menu.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    A bool value that determines whether the file menu is visible. The default value is false. If set to true, the file menu will be visible.

    Remarks

    This property controls the visibility of the file menu in the component. When set to true, the file menu is displayed, providing access to file-related commands and options. When set to false, the file menu is hidden.

    Methods

    Dispose(Boolean)

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

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved