New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class PropertyDefinition<T> : IPropertyDefinition<T>, IPropertyDefinition

Inheritance: objectPropertyDefinition<T>

Implements: IPropertyDefinitionIPropertyDefinition<T>

Constructors

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

C#
public PropertyDefinition(string name, bool affectsLayout, StylePropertyGroup stylePropertyGroup, T defaultValue = default, bool useSameValueAsPreviousOnInsert = true)
Parameters:namestring

The name of the property.

affectsLayoutbool

The affects layout.

stylePropertyGroupStylePropertyGroup

The style property group.

defaultValueT

The default value.

useSameValueAsPreviousOnInsertbool

The use same value as previous on insert.

Properties

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

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

The value indicating whether the property affects layout.

Implements: IPropertyDefinition.AffectsLayout

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

C#
public T DefaultValue { get; }
Property Value:

The default value.

Implements: IPropertyDefinition<T>.DefaultValue

The unique identifier for this property definition.

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

The name of the property.

Implements: IPropertyDefinition.Name

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

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

The style property group.

Implements: IPropertyDefinition.StylePropertyGroup

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

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

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

Implements: IPropertyDefinition.UseSameValueAsPreviousOnInsert