Class
CellStyle

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:

cs-api-definition
public class CellStyle

Inheritance: objectCellStyle

Properties

BottomBorder

Gets or sets the bottom border.

Declaration

cs-api-definition
public CellBorder BottomBorder { get; set; }

Property Value

CellBorder

The bottom border.

BuiltInId

Gets the built in id.

Declaration

cs-api-definition
public int? BuiltInId { get; }

Property Value

int?

The built in id.

Category

Returns the classification of this style for organizational purposes.

Declaration

cs-api-definition
public CellStyleCategory Category { get; }

Property Value

CellStyleCategory

The category.

DiagonalDownBorder

Gets or sets the diagonal down border.

Declaration

cs-api-definition
public CellBorder DiagonalDownBorder { get; set; }

Property Value

CellBorder

The diagonal down border.

DiagonalUpBorder

Gets or sets the diagonal up border.

Declaration

cs-api-definition
public CellBorder DiagonalUpBorder { get; set; }

Property Value

CellBorder

The diagonal up border.

Fill

Gets or sets the fill.

Declaration

cs-api-definition
public IFill Fill { get; set; }

Property Value

IFill

The fill value.

FontFamily

Gets or sets the font family.

Declaration

cs-api-definition
public ThemableFontFamily FontFamily { get; set; }

Property Value

ThemableFontFamily

The font family.

FontSize

Gets or sets the size of the font.

Declaration

cs-api-definition
public double FontSize { get; set; }

Property Value

double

The size of the font.

ForeColor

Gets or sets the fore color.

Declaration

cs-api-definition
public ThemableColor ForeColor { get; set; }

Property Value

ThemableColor

The fore color.

Format

Gets or sets the format.

Declaration

cs-api-definition
public CellValueFormat Format { get; set; }

Property Value

CellValueFormat

The format.

HorizontalAlignment

Gets or sets the horizontal alignment.

Declaration

cs-api-definition
public RadHorizontalAlignment HorizontalAlignment { get; set; }

Property Value

RadHorizontalAlignment

The horizontal alignment.

IncludeAlignment

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

Declaration

cs-api-definition
public bool IncludeAlignment { get; set; }

Property Value

bool

The value indicating whether the alignment property group is included.

IncludeBorder

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

Declaration

cs-api-definition
public bool IncludeBorder { get; set; }

Property Value

bool

The value indicating whether the border property group is included.

IncludeFill

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

Declaration

cs-api-definition
public bool IncludeFill { get; set; }

Property Value

bool

The value indicating whether the fill property group is included.

IncludeFont

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

Declaration

cs-api-definition
public bool IncludeFont { get; set; }

Property Value

bool

The value indicating whether the font property group is included.

IncludeNumber

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

Declaration

cs-api-definition
public bool IncludeNumber { get; set; }

Property Value

bool

The value indicating whether the number property group is included.

IncludeProtection

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

Declaration

cs-api-definition
public bool IncludeProtection { get; set; }

Property Value

bool

The value indicating whether the protection property group is included.

Indent

Gets or sets the indent.

Declaration

cs-api-definition
public int Indent { get; set; }

Property Value

int

The indent.

IsBold

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

Declaration

cs-api-definition
public bool IsBold { get; set; }

Property Value

bool

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

IsItalic

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

Declaration

cs-api-definition
public bool IsItalic { get; set; }

Property Value

bool

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

IsLocked

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

Declaration

cs-api-definition
public bool IsLocked { get; set; }

Property Value

bool

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

IsRemovable

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

Declaration

cs-api-definition
public bool IsRemovable { get; }

Property Value

bool

The value indicating whether the style is removable.

IsRemoved

Gets a value indicating whether the style is removed.

Declaration

cs-api-definition
public bool IsRemoved { get; }

Property Value

bool

The value indicating whether the style is removed.

IsUpdateInProgress

Gets a value indicating whether an update is in progress.

Declaration

cs-api-definition
public bool IsUpdateInProgress { get; }

Property Value

bool

The value indicating whether an update is in progress.

IsWrapped

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

Declaration

cs-api-definition
public bool IsWrapped { get; set; }

Property Value

bool

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

LeftBorder

Gets or sets the left border.

Declaration

cs-api-definition
public CellBorder LeftBorder { get; set; }

Property Value

CellBorder

The left border.

Name

Returns the unique name identifying this style within the workbook.

Declaration

cs-api-definition
public string Name { get; }

Property Value

string

The name of the style.

RightBorder

Gets or sets the right border.

Declaration

cs-api-definition
public CellBorder RightBorder { get; set; }

Property Value

CellBorder

The right border.

TextRotation

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

Declaration

cs-api-definition
public int TextRotation { get; set; }

Property Value

int

TopBorder

Gets or sets the top border.

Declaration

cs-api-definition
public CellBorder TopBorder { get; set; }

Property Value

CellBorder

The top border.

Underline

Gets or sets the underline.

Declaration

cs-api-definition
public UnderlineType Underline { get; set; }

Property Value

UnderlineType

The underline.

VerticalAlignment

Gets or sets the vertical alignment.

Declaration

cs-api-definition
public RadVerticalAlignment VerticalAlignment { get; set; }

Property Value

RadVerticalAlignment

The vertical alignment.

Workbook

Returns the workbook that owns this style.

Declaration

cs-api-definition
public Workbook Workbook { get; }

Property Value

Workbook

The workbook.

Methods

BeginUpdate()

Begins the update.

Declaration

cs-api-definition
public void BeginUpdate()

CopyPropertiesFrom(CellStyle)

Copies the style properties from another style.

Declaration

cs-api-definition
public void CopyPropertiesFrom(CellStyle fromStyle)

Parameters

fromStyle

CellStyle

From style.

EndUpdate()

Ends the update.

Declaration

cs-api-definition
public void EndUpdate()

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

GetAllProperties()

Gets all properties.

Declaration

cs-api-definition
public static IEnumerable<IPropertyDefinition> GetAllProperties()

Returns

IEnumerable<IPropertyDefinition>

All properties.

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

GetIsPropertyIncluded(IPropertyDefinition)

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

Declaration

cs-api-definition
public bool GetIsPropertyIncluded(IPropertyDefinition propertyDefinition)

Parameters

propertyDefinition

IPropertyDefinition

The property definition.

Returns

bool

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

GetIsStylePropertyGroupIncluded(StylePropertyGroup)

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

Declaration

cs-api-definition
public bool GetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup)

Parameters

stylePropertyGroup

StylePropertyGroup

The style property group.

Returns

bool

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

GetPropertyValue<T>(IPropertyDefinition<T>)

Gets the property value.

Declaration

cs-api-definition
public T GetPropertyValue<T>(IPropertyDefinition<T> propertyDefinition)

Parameters

propertyDefinition

IPropertyDefinition<T>

The property definition.

Returns

T

The property value.

HasSameProperties(CellStyle)

Determines whether the specified other style has same properties.

Declaration

cs-api-definition
public bool HasSameProperties(CellStyle otherStyle)

Parameters

otherStyle

CellStyle

The other style.

Returns

bool

True if has same properties.

IsPropertyValueSet<T>(IPropertyDefinition<T>)

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

Declaration

cs-api-definition
public bool IsPropertyValueSet<T>(IPropertyDefinition<T> propertyDefinition)

Parameters

propertyDefinition

IPropertyDefinition<T>

The property definition.

Returns

bool

True if has been set.

IsSupportedProperty(IPropertyDefinition)

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

Declaration

cs-api-definition
public static bool IsSupportedProperty(IPropertyDefinition propertyDefinition)

Parameters

propertyDefinition

IPropertyDefinition

The property definition.

Returns

bool

True if supported.

OnChanged()

Called when the style is changed.

Declaration

cs-api-definition
protected virtual void OnChanged()

SetIsStylePropertyGroupIncluded(StylePropertyGroup, bool)

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

Declaration

cs-api-definition
public void SetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup, bool value)

Parameters

stylePropertyGroup

StylePropertyGroup

The style property group.

value

bool

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

Events

Changed

Occurs when the style is changed.

Declaration

cs-api-definition
public event EventHandler<StyleChangedEventArgs> Changed

Event Value

EventHandler<StyleChangedEventArgs>