Class
PropertyDefinition<T>

Defines strongly-typed metadata for a cell property, including its name, default value, layout impact, and style category.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.PropertySystem

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Type Parameters:

T

The type of the T.

Syntax:

cs-api-definition
public class PropertyDefinition<T> : IPropertyDefinition<T>, IPropertyDefinition

Inheritance: objectPropertyDefinition<T>

Implements: IPropertyDefinitionIPropertyDefinition<T>

Constructors

PropertyDefinition(string, bool, StylePropertyGroup, T, bool)

Initializes a new instance of the PropertyDefinition<T> class.

Declaration

cs-api-definition
public PropertyDefinition(string name, bool affectsLayout, StylePropertyGroup stylePropertyGroup, T defaultValue = default, bool useSameValueAsPreviousOnInsert = true)

Parameters

name

string

The name of the property.

affectsLayout

bool

The affects layout.

stylePropertyGroup

StylePropertyGroup

The style property group.

defaultValue

T

The default value.

useSameValueAsPreviousOnInsert

bool

The use same value as previous on insert.

Properties

AffectsLayout

Indicates whether changes to this property require recalculating cell positions and sizes in the layout.

Declaration

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

Property Value

bool

The value indicating whether the property affects layout.

Implements IPropertyDefinition.AffectsLayout

DefaultValue

The default value returned when this property is not explicitly set on a cell, row, or column.

Declaration

cs-api-definition
public T DefaultValue { get; }

Property Value

T

The default value.

Implements IPropertyDefinition<T>.DefaultValue

Name

The unique identifier for this property definition.

Declaration

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

Property Value

string

The name of the property.

Implements IPropertyDefinition.Name

StylePropertyGroup

The category to which this property belongs (Number, Alignment, Font, Border, Fill, Protection), used for selective style application.

Declaration

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

Property Value

StylePropertyGroup

The style property group.

Implements IPropertyDefinition.StylePropertyGroup

UseSameValueAsPreviousOnInsert

Indicates whether newly inserted cells inherit this property value from the preceding cell.

Declaration

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

Property Value

bool

The value indicating whether to use same value as previous on insert.

Implements IPropertyDefinition.UseSameValueAsPreviousOnInsert