New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class StyleProperty<TValue, TPropertyContainer> : StylePropertyBase where TPropertyContainer : DocumentElementPropertiesBase

Inheritance: objectStylePropertyBaseStyleProperty<TValue, TPropertyContainer>

Derived Classes: ListIdPropertyTableCellTextAlignmentProperty

Constructors

C#
public StyleProperty(TPropertyContainer propertyContainer, StylePropertyDefinition<TValue, TPropertyContainer> propertyDefinition)
Parameters:propertyContainerTPropertyContainerpropertyDefinitionStylePropertyDefinition<TValue, TPropertyContainer>

Properties

PropertyContainer

TPropertyContainer

Gets the property container that holds the style properties.

C#
public TPropertyContainer PropertyContainer { get; }

Represents the property definition for a specific style property.

C#
public override IStylePropertyDefinition PropertyDefinition { get; }

Overrides: StylePropertyBase.PropertyDefinition

Gets the source of the value for the style property.

C#
public override RadValueSource ValueSource { get; }

Overrides: StylePropertyBase.ValueSource

Methods

C#
protected void CheckForValueChange(RadValueSource changedValueSource)
Parameters:changedValueSourceRadValueSource

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

C#
public override void ClearValue()

Overrides: StylePropertyBase.ClearValue()

C#
protected virtual TValue GetLocalParentValueOverride()
Returns:

TValue

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

C#
public TValue GetValue()
Returns:

TValue

The value of the style property of type TValue.

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

C#
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.

Determines whether the style property has a local value set.

C#
public override bool HasLocalValue()
Returns:

bool

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

Overrides: StylePropertyBase.HasLocalValue()

C#
protected virtual void OnPropertyValueChanged(TValue oldValue, TValue newValue)
Parameters:oldValueTValuenewValueTValue

Sets the value of the style property.

C#
public void SetValue(TValue value)
Parameters:valueTValue

The value to assign to the style property.