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:
public class StyleProperty<TValue, TPropertyContainer> : StylePropertyBase where TPropertyContainer : DocumentElementPropertiesBase
Inheritance: objectStylePropertyBaseStyleProperty<TValue, TPropertyContainer>
Derived Classes:
Constructors
public StyleProperty(TPropertyContainer propertyContainer, StylePropertyDefinition<TValue, TPropertyContainer> propertyDefinition)
Properties
PropertyContainer
TPropertyContainer
Gets the property container that holds the style properties.
public TPropertyContainer PropertyContainer { get; }
Represents the property definition for a specific style property.
public override IStylePropertyDefinition PropertyDefinition { get; }
Overrides:
Gets the source of the value for the style property.
public override RadValueSource ValueSource { get; }
Overrides:
Methods
protected void CheckForValueChange(RadValueSource changedValueSource)
Clears the local value of the style property, resetting it to its default value.
public override void ClearValue()
Overrides:
protected virtual TValue GetLocalParentValueOverride()
TValue
GetValue()
TValue
Retrieves the value of the style property from the specified property container.
public TValue GetValue()
TValue
The value of the style property of type TValue.
GetValueOrDefault()
TValue
Retrieves the value of the style property, returning the default value if the property is not set.
public TValue GetValueOrDefault()
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.
public override bool HasLocalValue()
A boolean value indicating whether the style property has a local value.
Overrides:
protected virtual void OnPropertyValueChanged(TValue oldValue, TValue newValue)
Sets the value of the style property.
public void SetValue(TValue value)
The value to assign to the style property.