New to Telerik Document ProcessingStart a free 30-day trial

Named collection of formatting properties applied to cells, enabling consistent appearance across cell ranges through style inheritance.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.PropertySystem

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class CellStyle

Inheritance: objectCellStyle

Events

Occurs when the style is changed.

C#
public event EventHandler<StyleChangedEventArgs> Changed

Methods

Begins the update.

C#
public void BeginUpdate()

Copies the style properties from another style.

C#
public void CopyPropertiesFrom(CellStyle fromStyle)
Parameters:fromStyleCellStyle

From style.

Ends the update.

C#
public void EndUpdate()

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Gets all properties.

C#
public static IEnumerable<IPropertyDefinition> GetAllProperties()
Returns:

IEnumerable<IPropertyDefinition>

All properties.

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Gets a value indicating if the property is included in the style.

C#
public bool GetIsPropertyIncluded(IPropertyDefinition propertyDefinition)
Parameters:propertyDefinitionIPropertyDefinition

The property definition.

Returns:

bool

The value indicating if the property is included in the style.

Gets a value indicating whether the property group is included in cell style.

C#
public bool GetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup)
Parameters:stylePropertyGroupStylePropertyGroup

The style property group.

Returns:

bool

The value indicating whether the property group is included in cell style.

Gets the property value.

C#
public T GetPropertyValue<T>(IPropertyDefinition<T> propertyDefinition)
Parameters:propertyDefinitionIPropertyDefinition<T>

The property definition.

Returns:

T

The property value.

Determines whether the specified other style has same properties.

C#
public bool HasSameProperties(CellStyle otherStyle)
Parameters:otherStyleCellStyle

The other style.

Returns:

bool

True if has same properties.

Determines whether a value has been set for the specified property.

C#
public bool IsPropertyValueSet<T>(IPropertyDefinition<T> propertyDefinition)
Parameters:propertyDefinitionIPropertyDefinition<T>

The property definition.

Returns:

bool

True if has been set.

Determines whether the specified property definition is supported by the style.

C#
public static bool IsSupportedProperty(IPropertyDefinition propertyDefinition)
Parameters:propertyDefinitionIPropertyDefinition

The property definition.

Returns:

bool

True if supported.

Called when the style is changed.

C#
protected virtual void OnChanged()

Sets a value indicating whether the property group is included in cell style.

C#
public void SetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup, bool value)
Parameters:stylePropertyGroupStylePropertyGroup

The style property group.

valuebool

The value indicating whether the property group is included in cell style.

Properties

Gets or sets the bottom border.

C#
public CellBorder BottomBorder { get; set; }
Property Value:

The bottom border.

Gets the built in id.

C#
public int? BuiltInId { get; }
Property Value:

The built in id.

Returns the classification of this style for organizational purposes.

C#
public CellStyleCategory Category { get; }
Property Value:

The category.

Gets or sets the diagonal down border.

C#
public CellBorder DiagonalDownBorder { get; set; }
Property Value:

The diagonal down border.

Gets or sets the diagonal up border.

C#
public CellBorder DiagonalUpBorder { get; set; }
Property Value:

The diagonal up border.

Gets or sets the fill.

C#
public IFill Fill { get; set; }
Property Value:

The fill value.

Gets or sets the font family.

C#
public ThemableFontFamily FontFamily { get; set; }
Property Value:

The font family.

Gets or sets the size of the font.

C#
public double FontSize { get; set; }
Property Value:

The size of the font.

Gets or sets the fore color.

C#
public ThemableColor ForeColor { get; set; }
Property Value:

The fore color.

Gets or sets the format.

C#
public CellValueFormat Format { get; set; }
Property Value:

The format.

Gets or sets the horizontal alignment.

C#
public RadHorizontalAlignment HorizontalAlignment { get; set; }
Property Value:

The horizontal alignment.

Gets or sets a value indicating whether the alignment property group is included.

C#
public bool IncludeAlignment { get; set; }
Property Value:

The value indicating whether the alignment property group is included.

Gets or sets a value indicating whether the border property group is included.

C#
public bool IncludeBorder { get; set; }
Property Value:

The value indicating whether the border property group is included.

Gets or sets a value indicating whether the fill property group is included.

C#
public bool IncludeFill { get; set; }
Property Value:

The value indicating whether the fill property group is included.

Gets or sets a value indicating whether the font property group is included.

C#
public bool IncludeFont { get; set; }
Property Value:

The value indicating whether the font property group is included.

Gets or sets a value indicating whether the number property group is included.

C#
public bool IncludeNumber { get; set; }
Property Value:

The value indicating whether the number property group is included.

Gets or sets a value indicating whether the protection property group is included.

C#
public bool IncludeProtection { get; set; }
Property Value:

The value indicating whether the protection property group is included.

Gets or sets the indent.

C#
public int Indent { get; set; }
Property Value:

The indent.

Gets or sets a value indicating whether the text affected by the style is bold.

C#
public bool IsBold { get; set; }
Property Value:

The value indicating whether the text affected by the style is bold..

Gets or sets a value indicating whether the text affected by the style is italic.

C#
public bool IsItalic { get; set; }
Property Value:

The value indicating whether the text affected by the style is italic.

Gets or sets a value indicating whether the cell affected by the style is locked.

C#
public bool IsLocked { get; set; }
Property Value:

The value indicating whether the cell affected by the style is locked.

Indicates whether this style can be deleted from the workbook; built-in styles cannot be removed.

C#
public bool IsRemovable { get; }
Property Value:

The value indicating whether the style is removable.

Gets a value indicating whether the style is removed.

C#
public bool IsRemoved { get; }
Property Value:

The value indicating whether the style is removed.

Gets or sets a value indicating whether the text affected by the style has strikethrough decoration.

C#
public bool IsStrikethrough { get; set; }
Property Value:

The value indicating whether the text affected by the style is strikethrough.

Gets a value indicating whether an update is in progress.

C#
public bool IsUpdateInProgress { get; }
Property Value:

The value indicating whether an update is in progress.

Gets or sets a value indicating whether the text affected by the style is wrapped.

C#
public bool IsWrapped { get; set; }
Property Value:

The value indicating whether the text affected by the style is wrapped.

Gets or sets the left border.

C#
public CellBorder LeftBorder { get; set; }
Property Value:

The left border.

Returns the unique name identifying this style within the workbook.

C#
public string Name { get; }
Property Value:

The name of the style.

Gets or sets the right border.

C#
public CellBorder RightBorder { get; set; }
Property Value:

The right border.

Gets or sets the text rotation degree in the range -90 to 90.

C#
public int TextRotation { get; set; }

Gets or sets the top border.

C#
public CellBorder TopBorder { get; set; }
Property Value:

The top border.

Gets or sets the underline.

C#
public UnderlineType Underline { get; set; }
Property Value:

The underline.

Gets or sets the vertical alignment.

C#
public RadVerticalAlignment VerticalAlignment { get; set; }
Property Value:

The vertical alignment.

Gets or sets the vertical text alignment (none, superscript, or subscript) for the text affected by the style.

C#
public VerticalTextAlignment VerticalTextAlignment { get; set; }
Property Value:

The vertical text alignment.

Returns the workbook that owns this style.

C#
public Workbook Workbook { get; }
Property Value:

The workbook.