Class
StyleProperty<TValue, TPropertyContainer>

Represents a style property that can be applied to a property container with a specified value type.

Definition

Namespace:Telerik.Windows.Documents.Model.Styles

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Type Parameters:

TValue

The type of the value that the style property can have.

TPropertyContainer

The type of the property container to which the style property is applied.

Syntax:

cs-api-definition
public class StyleProperty<TValue, TPropertyContainer> : StylePropertyBase where TPropertyContainer : DocumentElementPropertiesBase

Inheritance: objectStylePropertyBaseStyleProperty<TValue, TPropertyContainer>

Derived Classes: ListIdPropertyTableCellTextAlignmentProperty

Constructors

StyleProperty(TPropertyContainer, StylePropertyDefinition<TValue, TPropertyContainer>)

Declaration

cs-api-definition
public StyleProperty(TPropertyContainer propertyContainer, StylePropertyDefinition<TValue, TPropertyContainer> propertyDefinition)

Parameters

propertyContainer

TPropertyContainer

propertyDefinition

StylePropertyDefinition<TValue, TPropertyContainer>

Properties

PropertyContainer

Gets the property container that holds the style properties.

Declaration

cs-api-definition
public TPropertyContainer PropertyContainer { get; }

Property Value

TPropertyContainer

PropertyDefinition

Represents the property definition for a specific style property.

Declaration

cs-api-definition
public override IStylePropertyDefinition PropertyDefinition { get; }

Property Value

IStylePropertyDefinition

Overrides StylePropertyBase.PropertyDefinition

ValueSource

Gets the source of the value for the style property.

Declaration

cs-api-definition
public override RadValueSource ValueSource { get; }

Property Value

RadValueSource

Overrides StylePropertyBase.ValueSource

Methods

CheckForValueChange(RadValueSource)

Declaration

cs-api-definition
protected void CheckForValueChange(RadValueSource changedValueSource)

Parameters

changedValueSource

RadValueSource

ClearValue()

Clears the local value of the style property, resetting it to its default value.

Declaration

cs-api-definition
public override void ClearValue()

Overrides StylePropertyBase.ClearValue()

GetLocalParentValueOverride()

Declaration

cs-api-definition
protected virtual TValue GetLocalParentValueOverride()

Returns

TValue

GetValue()

Retrieves the value of the style property from the specified property container.

Declaration

cs-api-definition
public TValue GetValue()

Returns

TValue

The value of the style property of type TValue.

GetValueOrDefault()

Retrieves the value of the style property, returning the default value if the property is not set.

Declaration

cs-api-definition
public TValue GetValueOrDefault()

Returns

TValue

The current value of the style property if it is set; otherwise, the default value for the specified property type.

HasLocalValue()

Determines whether the style property has a local value set.

Declaration

cs-api-definition
public override bool HasLocalValue()

Returns

bool

A boolean value indicating whether the style property has a local value.

Overrides StylePropertyBase.HasLocalValue()

OnPropertyValueChanged(TValue, TValue)

Declaration

cs-api-definition
protected virtual void OnPropertyValueChanged(TValue oldValue, TValue newValue)

Parameters

oldValue

TValue

newValue

TValue

SetValue(TValue)

Sets the value of the style property.

Declaration

cs-api-definition
public void SetValue(TValue value)

Parameters

value

TValue

The value to assign to the style property.