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

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.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class PropertyChangeBehavior

Inheritance: objectPropertyChangeBehavior

Derived Classes: CalendarMouseOverBehaviorCarouselItemsLocationBehaviorGalleryMouseOverBehaviorRibbonButtonBorderBehavior

Gets or sets the property that triggers this behavior.

C#
public RadProperty Property { get; set; }
Property Value:

The RadProperty that this behavior monitors for changes.

Constructors

Initializes a new instance of the PropertyChangeBehavior class.

C#
public PropertyChangeBehavior(RadProperty executeBehaviorPropertyTrigger)
Parameters:executeBehaviorPropertyTriggerRadProperty

The property that triggers this behavior when it changes.

Methods

Provides a callback for behavior-removal cleanup.

C#
public virtual void BehaviorRemoving(RadElement element)
Parameters:elementRadElement

The element from which the behavior is being removed.

RadElement behavior-removal methods do not invoke this callback; callers that require cleanup must call it explicitly.

Called when the associated property changes on an element. Override this method to implement custom behavior logic.

C#
public virtual void OnPropertyChange(RadElement element, RadPropertyChangedEventArgs e)
Parameters:elementRadElement

The element on which the property changed.

eRadPropertyChangedEventArgs

The event arguments containing details about the property change.

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.