New to Telerik UI for WinForms? Start a free 30-day trial

Defines the identity, value type, default, and layout effects of a document or style property.

Definition

Namespace:Telerik.WinForms.Documents.Model.Styles

Assembly:Telerik.WinControls.RichTextEditor.dll

Type Parameters:

TValue

The property's value type.

TProperties

The properties container that owns the property.

Syntax:

C#
public class StylePropertyDefinition<TValue, TProperties> : IStylePropertyDefinition where TProperties : DocumentElementPropertiesBase

Inheritance: objectStylePropertyDefinition<TValue, TProperties>

Implements: IStylePropertyDefinition

Constructors

Creates a property definition from its name, layout options, and default value.

C#
public StylePropertyDefinition(string propertyName, StylePropertyOptions propertyOptions, Selector<TProperties, StyleProperty<TValue, TProperties>> propertySelector, TValue defaultValue)
Parameters:propertyNamestring

The name used to look up the property in its properties container.

propertyOptionsStylePropertyOptions

The layout invalidation flags for changes to the property.

propertySelectorSelector<TProperties, StyleProperty<TValue, TProperties>>

A selector parameter that this constructor does not retain or invoke.

defaultValueTValue

The value used when no local, style, or parent value is available.

Creates a property definition without a selector.

C#
public StylePropertyDefinition(string propertyName, StylePropertyOptions propertyOptions, TValue defaultValue)
Parameters:propertyNamestring

The name used to look up the property in its properties container.

propertyOptionsStylePropertyOptions

The layout invalidation flags for changes to the property.

defaultValueTValue

The value used when no local, style, or parent value is available.

Properties

Gets the value used when no local, style, or parent value is available.

C#
public TValue DefaultValue { get; }

Gets the index used to locate this property in a properties container.

C#
public int GlobalPropertyIndex { get; }

Implements: IStylePropertyDefinition.GlobalPropertyIndex

Gets the runtime type of the properties container that owns the property.

C#
public Type PropertyContainerType { get; }

Implements: IStylePropertyDefinition.PropertyContainerType

Gets the name by which the property can be looked up in its properties container.

C#
public string PropertyName { get; }

Implements: IStylePropertyDefinition.PropertyName

Gets the layout invalidation flags applied when this property's value changes.

C#
public StylePropertyOptions PropertyOptions { get; }

Implements: IStylePropertyDefinition.PropertyOptions

Gets the runtime type of the property's value.

C#
public Type PropertyValueType { get; }

Implements: IStylePropertyDefinition.PropertyValueType

Methods

Clears the local value of this property on a document element so normal value resolution can resume.

C#
public void ClearValue(DocumentElement element)
Parameters:elementDocumentElement

The document element whose property value is cleared.

Implements: IStylePropertyDefinition.ClearValue(DocumentElement)