WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CommandExtensions

    Show / Hide Table of Contents

    Class CommandExtensions

    Provides the Interaction logic for commands in SfSpreadsheet

    Inheritance
    System.Object
    CommandExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.Spreadsheet.Commands
    Assembly: Syncfusion.SfSpreadsheet.WPF.dll
    Syntax
    public static class CommandExtensions

    Methods

    ApplyDataValidation(SfSpreadsheet, IWorksheet, IRange, ExcelDataType, ExcelDataValidationComparisonOperator, String, String, String, String, String, String, Boolean, Boolean, Boolean, Boolean)

    Apply the data validation for the selected range of cells with the specified criterias

    Declaration
    public static bool ApplyDataValidation(this SfSpreadsheet spreadsheet, IWorksheet worksheet, IRange validationRange, ExcelDataType allowType, ExcelDataValidationComparisonOperator ComparisonOperator, string conditionvalue1, string conditionvalue2, string PromptBoxTitle, string PromptBoxText, string ErrorBoxTitle, string ErrorBoxText, bool ShowPromptBox, bool ShowErrorBox, bool IgnoreBlank, bool InCellDropDown)
    Parameters
    Type Name Description
    SfSpreadsheet spreadsheet

    An instance of SfSpreadsheet

    IWorksheet worksheet

    Current worksheet

    IRange validationRange

    Range where the data validation applied

    ExcelDataType allowType

    Type of Validation test to be performed

    ExcelDataValidationComparisonOperator ComparisonOperator

    The comparison Operation for the data validation

    System.String conditionvalue1

    Condition set for the first part of data validation

    System.String conditionvalue2

    Condition set for the second part of data validation

    System.String PromptBoxTitle

    Title of the PromptBox

    System.String PromptBoxText

    Text in the PromptBox

    System.String ErrorBoxTitle

    Title in the ErrorBox

    System.String ErrorBoxText

    Text in the ErrorBox

    System.Boolean ShowPromptBox

    True if PromptBox need to be shown, else False

    System.Boolean ShowErrorBox

    True if ErrorBox need to be shown, else False

    System.Boolean IgnoreBlank

    True if empty values are allowed, else False

    System.Boolean InCellDropDown

    True if the dropdown needs to be visible, else False

    Returns
    Type Description
    System.Boolean

    True or False

    ChangeFillColor(SfSpreadsheet, Color)

    Fills the color for the Selected cell/range of cells.

    Declaration
    public static void ChangeFillColor(this SfSpreadsheet SfSpreadsheet, Color fillColor)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.Windows.Media.Color fillColor

    Color to be Filled in the selected range

    ChangeFontColor(SfSpreadsheet, Color)

    Changes the color of the font for the selected cell/range of cells.

    Declaration
    public static void ChangeFontColor(this SfSpreadsheet SfSpreadsheet, Color fontColor)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.Windows.Media.Color fontColor

    Font Color to be changed

    ChangeFontFamily(SfSpreadsheet, String)

    Changes the font family for the selected cell/range of cells.

    Declaration
    public static void ChangeFontFamily(this SfSpreadsheet SfSpreadsheet, string fontFamily)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.String fontFamily

    Name of the FontFamily to be changed

    ChangeFontSize(SfSpreadsheet, Double)

    Changes the size of the font for the selected cell/range of cells.

    Declaration
    public static void ChangeFontSize(this SfSpreadsheet SfSpreadsheet, double size)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.Double size

    Size of the Font to be changed

    ChangeNumberFormat(SfSpreadsheet, String)

    Sets the NumberFormat for the selected cell/range of cells

    Declaration
    public static void ChangeNumberFormat(this SfSpreadsheet SfSpreadsheet, string numberFormat)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.String numberFormat

    The number format to be set for the cell

    ConvertColor(Color)

    Converts ARGB to the color

    Declaration
    public static Color ConvertColor(Color color)
    Parameters
    Type Name Description
    System.Windows.Media.Color color

    Color to be converted

    Returns
    Type Description
    System.Drawing.Color

    Color

    FocusActiveGrid(SfSpreadsheet)

    Set the Focus to the Active SpreadsheetGridSpreadsheetGrid

    Declaration
    public static void FocusActiveGrid(this SfSpreadsheet spreadsheet)
    Parameters
    Type Name Description
    SfSpreadsheet spreadsheet

    An instance of SfSpreadsheet

    FormatIndent(SfSpreadsheet, Boolean)

    For changing the alignment of the selected cell/range of cells.

    Declaration
    public static void FormatIndent(this SfSpreadsheet spreadsheet, bool canincrease)
    Parameters
    Type Name Description
    SfSpreadsheet spreadsheet

    An instance of SfSpreadsheet

    System.Boolean canincrease

    True or False

    FormatIndentLevel(SfSpreadsheet, Int32)

    Set the indent based on the indent level value for the selected cell/range of cells

    Declaration
    public static void FormatIndentLevel(this SfSpreadsheet spreadsheet, int size)
    Parameters
    Type Name Description
    SfSpreadsheet spreadsheet

    An instance of SfSpreadsheet

    System.Int32 size

    The indent level for the range

    FormatOrientation(SfSpreadsheet, Int32)

    Changing the Orientation for the selected cell/range of cells.

    Declaration
    public static void FormatOrientation(this SfSpreadsheet spreadsheet, int angle)
    Parameters
    Type Name Description
    SfSpreadsheet spreadsheet

    An instance of SfSpreadsheet

    System.Int32 angle

    Text rotation angle

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