ClassCellStyle
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:
public class CellStyle
Inheritance: objectCellStyle
Properties
BottomBorder
Gets or sets the bottom border.
Declaration
public CellBorder BottomBorder { get; set; }
Property Value
The bottom border.
BuiltInId
Gets the built in id.
Category
Returns the classification of this style for organizational purposes.
Declaration
public CellStyleCategory Category { get; }
Property Value
The category.
DiagonalDownBorder
Gets or sets the diagonal down border.
Declaration
public CellBorder DiagonalDownBorder { get; set; }
Property Value
The diagonal down border.
DiagonalUpBorder
Gets or sets the diagonal up border.
Declaration
public CellBorder DiagonalUpBorder { get; set; }
Property Value
The diagonal up border.
Fill
Gets or sets the fill.
FontFamily
Gets or sets the font family.
Declaration
public ThemableFontFamily FontFamily { get; set; }
Property Value
The font family.
FontSize
Gets or sets the size of the font.
Declaration
public double FontSize { get; set; }
Property Value
The size of the font.
ForeColor
Gets or sets the fore color.
Declaration
public ThemableColor ForeColor { get; set; }
Property Value
The fore color.
Format
Gets or sets the format.
Declaration
public CellValueFormat Format { get; set; }
Property Value
The format.
HorizontalAlignment
Gets or sets the horizontal alignment.
Declaration
public RadHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
The horizontal alignment.
IncludeAlignment
Gets or sets a value indicating whether the alignment property group is included.
Declaration
public bool IncludeAlignment { get; set; }
Property Value
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
public bool IncludeBorder { get; set; }
Property Value
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
public bool IncludeFill { get; set; }
Property Value
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
public bool IncludeFont { get; set; }
Property Value
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
public bool IncludeNumber { get; set; }
Property Value
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
public bool IncludeProtection { get; set; }
Property Value
The value indicating whether the protection property group is included.
Indent
Gets or sets the indent.
IsBold
Gets or sets a value indicating whether the text affected by the style is bold.
Declaration
public bool IsBold { get; set; }
Property Value
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
public bool IsItalic { get; set; }
Property Value
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
public bool IsLocked { get; set; }
Property Value
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
public bool IsRemovable { get; }
Property Value
The value indicating whether the style is removable.
IsRemoved
Gets a value indicating whether the style is removed.
Declaration
public bool IsRemoved { get; }
Property Value
The value indicating whether the style is removed.
IsUpdateInProgress
Gets a value indicating whether an update is in progress.
Declaration
public bool IsUpdateInProgress { get; }
Property Value
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
public bool IsWrapped { get; set; }
Property Value
The value indicating whether the text affected by the style is wrapped.
LeftBorder
Gets or sets the left border.
Declaration
public CellBorder LeftBorder { get; set; }
Property Value
The left border.
Name
Returns the unique name identifying this style within the workbook.
Declaration
public string Name { get; }
Property Value
The name of the style.
RightBorder
Gets or sets the right border.
Declaration
public CellBorder RightBorder { get; set; }
Property Value
The right border.
TextRotation
Gets or sets the text rotation degree in the range -90 to 90.
TopBorder
Gets or sets the top border.
Declaration
public CellBorder TopBorder { get; set; }
Property Value
The top border.
Underline
Gets or sets the underline.
Declaration
public UnderlineType Underline { get; set; }
Property Value
The underline.
VerticalAlignment
Gets or sets the vertical alignment.
Declaration
public RadVerticalAlignment VerticalAlignment { get; set; }
Property Value
The vertical alignment.
Methods
CopyPropertiesFrom(CellStyle)
Copies the style properties from another style.
Declaration
public void CopyPropertiesFrom(CellStyle fromStyle)
Parameters
fromStyle
From style.
GetAllProperties()
Gets all properties.
Declaration
public static IEnumerable<IPropertyDefinition> GetAllProperties()
Returns
IEnumerable<IPropertyDefinition>
All properties.
GetHashCode()
Serves as a hash function for a particular type.
GetIsPropertyIncluded(IPropertyDefinition)
Gets a value indicating if the property is included in the style.
Declaration
public bool GetIsPropertyIncluded(IPropertyDefinition propertyDefinition)
Parameters
propertyDefinition
The property definition.
Returns
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
public bool GetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup)
Parameters
stylePropertyGroup
The style property group.
Returns
The value indicating whether the property group is included in cell style.
GetPropertyValue<T>(IPropertyDefinition<T>)
Gets the property value.
Declaration
public T GetPropertyValue<T>(IPropertyDefinition<T> propertyDefinition)
Parameters
propertyDefinition
The property definition.
Returns
T
The property value.
HasSameProperties(CellStyle)
Determines whether the specified other style has same properties.
IsPropertyValueSet<T>(IPropertyDefinition<T>)
Determines whether a value has been set for the specified property.
Declaration
public bool IsPropertyValueSet<T>(IPropertyDefinition<T> propertyDefinition)
Parameters
propertyDefinition
The property definition.
Returns
True if has been set.
IsSupportedProperty(IPropertyDefinition)
Determines whether the specified property definition is supported by the style.
Declaration
public static bool IsSupportedProperty(IPropertyDefinition propertyDefinition)
Parameters
propertyDefinition
The property definition.
Returns
True if supported.
OnChanged()
Called when the style is changed.
Declaration
protected virtual void OnChanged()
SetIsStylePropertyGroupIncluded(StylePropertyGroup, bool)
Sets a value indicating whether the property group is included in cell style.
Declaration
public void SetIsStylePropertyGroupIncluded(StylePropertyGroup stylePropertyGroup, bool value)
Parameters
stylePropertyGroup
The style property group.
value
The value indicating whether the property group is included in cell style.
Events
Changed
Occurs when the style is changed.
Declaration
public event EventHandler<StyleChangedEventArgs> Changed
Event Value