menu

WPF

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

    Show / Hide Table of Contents

    Class SfSpreadsheetRibbon

    SfSpreadsheetRibbon, an user interface, is designed to help you quickly find the commands that you need to complete a task.

    Inheritance
    System.Object
    SfSpreadsheetRibbon
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Spreadsheet
    Assembly: Syncfusion.SfSpreadsheet.WPF.dll
    Syntax
    public class SfSpreadsheetRibbon : Control, IDisposable
    Remarks

    Commands are organized in logical groups that are collected together under tabs.The tabs in SfSpreadsheetRibbon are File, Home, Data and View.

    Examples
    
    
     
    
    
    

    Constructors

    SfSpreadsheetRibbon()

    Initializes a new instance of the SfSpreadsheetRibbon class.

    Declaration
    public SfSpreadsheetRibbon()

    Fields

    FontFamilyNamesProperty

    Identifies the FontFamilyNames dependency property.

    Declaration
    public static readonly DependencyProperty FontFamilyNamesProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the dependency property.

    FontSizeSourceProperty

    Identifies the FontSizeSource dependency property.

    Declaration
    public static readonly DependencyProperty FontSizeSourceProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the dependency property.

    IsLoaded

    Sets to true, when the SfSpreadsheetRibbon is loaded.

    Declaration
    protected bool IsLoaded
    Field Value
    Type
    System.Boolean
    Remarks

    By default, value is set to false.

    IsTemplateApplied

    Sets to true, whenever a new template of SfSpreadsheet Ribbon is applied.

    Declaration
    protected bool IsTemplateApplied
    Field Value
    Type
    System.Boolean
    Remarks

    By default, value is set to false.

    NumberFormatSourceProperty

    Identifies the NumberFormatSource dependency property.

    Declaration
    public static readonly DependencyProperty NumberFormatSourceProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the dependency property.

    Properties

    FontFamilyNames

    Gets or sets the collection of System installed Fonts.

    Declaration
    public List<string> FontFamilyNames { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.String>

    list of fonts.

    FontSizeSource

    Gets or sets the collection of different font sizes to be used.

    Declaration
    public double[] FontSizeSource { get; set; }
    Property Value
    Type Description
    System.Double[]

    Size of the font

    NumberFormatSource

    Gets or sets the collection of Number Formats to be used.

    Declaration
    public IEnumerable NumberFormatSource { get; set; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    An IEnumerator that can be used to iterate through the collection.

    SfSpreadsheet

    Gets or sets the instance of SfSpreadsheet which is used for viewing and editing excel files.

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

    An instance of SfSpreadsheet.

    Methods

    Dispose()

    Dispose all the resources used by the SfSpreadsheetRibbon class

    Declaration
    public void Dispose()

    Dispose(Boolean)

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

    OnActiveSheetChanged()

    Invoked to update the protection mode and freeze pane visibility status when the active sheet is changed.

    Declaration
    protected virtual void OnActiveSheetChanged()

    OnApplyTemplate()

    When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.

    Declaration
    public override void OnApplyTemplate()
    Remarks

    Builds the visual tree for the SfSpreadsheetRibbon when a new template is applied.

    OnCommandExecuted(Object, CommandExecutionEventArgs)

    Invoked when the commands in the ribbon are executed

    Declaration
    protected virtual void OnCommandExecuted(object sender, CommandExecutionEventArgs args)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    CommandExecutionEventArgs args

    An CommandExecutionEventArgs that contains the event data.

    Remarks

    Updates the selected command's visibility mode

    OnCommandExecuting(Object, CommandExecutingEventArgs)

    Invoked when the commnds in the ribbon are executing

    Declaration
    protected virtual void OnCommandExecuting(object sender, CommandExecutingEventArgs args)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    CommandExecutingEventArgs args

    An CommandExecutionEventArgs that contains the event data.

    Remarks

    closes the ribbon backstage when the options in the File menu is selected

    OnCurrentCellRangeChanged()

    Updates the visibility status of the comments for the selected range in SfSpreadsheet.

    Declaration
    protected virtual void OnCurrentCellRangeChanged()

    OnCurrentCellStyleChanged()

    Invoked to update the current cell style operations in SfSpreadsheet.

    Declaration
    protected virtual void OnCurrentCellStyleChanged()
    Remarks

    The cellstyle options such as font size, family, style, horizontal and vertical alignment, number format, wrap text, cell orientation, merge and center operations for the current cell are updated.

    OnMyDataContextChanged(DependencyObject, DependencyPropertyChangedEventArgs)

    Used to update the events associated with ribbon when the the dataContext is changed.

    Declaration
    protected static void OnMyDataContextChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyObject dependencyObject

    source.

    System.Windows.DependencyPropertyChangedEventArgs args

    An System.Windows.DependencyPropertyChangedEventArgs that contains the event data.

    OnMyDataContextChanged(DependencyPropertyChangedEventArgs)

    Invoked to refresh/update the events and functions associated with SfSpreadsheetRibbon.

    Declaration
    protected virtual void OnMyDataContextChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    An System.Windows.DependencyPropertyChangedEventArgs that contains the event data.

    OnSpreadSheetPropertyChanged(Object, PropertyChangedEventArgs)

    Event raised when the current property in SfSpreadsheet is changed.

    Declaration
    protected virtual void OnSpreadSheetPropertyChanged(object sender, PropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.ComponentModel.PropertyChangedEventArgs e

    An System.ComponentModel.PropertyChangedEventArgs that contains the event data.

    Remarks

    Invoked to update the current cell style, range, active sheet and workbook.

    OnWorkbookChanged()

    Invoked to update the workbook version and protection mode in SfSpreadsheet when the workbook is changed.

    Declaration
    protected virtual void OnWorkbookChanged()

    RefreshRibbon()

    Used to refresh/update the active state of the sfspreadsheet ribbon.

    Declaration
    public virtual void RefreshRibbon()
    Remarks

    It updates the active sheet, workbook, current cellstyle and range properties.

    UnWireEvents()

    This method is called to unhook the events associated with SfSpreadsheet Ribbon.

    Declaration
    protected virtual void UnWireEvents()

    WireEvents()

    This method is to initialize the events associated with the ribbon interactions.

    Declaration
    protected virtual void WireEvents()

    Implements

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