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