Class PropertyChangeBehavior
Represents a behavior that is executed when a specific property changes. This class provides a base implementation for custom behaviors that respond to property changes.
Inheritance
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class PropertyChangeBehavior
Remarks
PropertyChangeBehavior allows developers to define custom logic that executes when a particular RadProperty changes on a RadElement. This enables reactive programming patterns and automatic updates based on property state changes.
Constructors
PropertyChangeBehavior(RadProperty)
Initializes a new instance of the PropertyChangeBehavior class.
Declaration
public PropertyChangeBehavior(RadProperty executeBehaviorPropertyTrigger)
Parameters
RadProperty
executeBehaviorPropertyTrigger
The property that triggers this behavior when it changes. |
Properties
Property
Gets or sets the property that triggers this behavior.
Declaration
public RadProperty Property { get; set; }
Property Value
RadProperty
The RadProperty that this behavior monitors for changes. |
Methods
BehaviorRemoving(RadElement)
Called when this behavior is being removed from an element. Override this method to perform cleanup operations.
Declaration
public virtual void BehaviorRemoving(RadElement element)
Parameters
RadElement
element
The element from which the behavior is being removed. |
Remarks
This method provides an opportunity to clean up any resources or reverse any changes made by the behavior before it is removed.
OnPropertyChange(RadElement, RadPropertyChangedEventArgs)
Called when the associated property changes on an element. Override this method to implement custom behavior logic.
Declaration
public virtual void OnPropertyChange(RadElement element, RadPropertyChangedEventArgs e)
Parameters
RadElement
element
The element on which the property changed. |
RadPropertyChangedEventArgs
e
The event arguments containing details about the property change. |
Remarks
This method is called automatically by the property system when the monitored property changes. Derived classes should override this method to provide the specific behavior implementation.