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

Encapsulates mechanisms to build behaviors that are attached to object using attached properties.

Definition

Namespace:Telerik.Windows.Controls.FieldList

Assembly:Telerik.Windows.Controls.PivotFieldList.dll

Syntax:

C#
public abstract class AttachedBehavior

Inheritance: objectAttachedBehavior

Derived Classes: DragDropBehaviorEditorsBehaviorFieldListContextMenuBehaviorRoutedContextMenuBehaviorWindowDialogHostingBehavior

Constructors

C#
protected AttachedBehavior()

Methods

Attaches this behavior to the element.

C#
protected abstract void Attach(DependencyObject element)
Parameters:elementDependencyObject

Removes this behavior from the element.

C#
protected abstract void Detach(DependencyObject element)
Parameters:elementDependencyObject

Detaches the previous behavior of the element and attaches the next one. The signature is suitable for dependency property changed callback.

C#
public static void Reattach(DependencyObject element, DependencyPropertyChangedEventArgs args)
Parameters:elementDependencyObjectargsDependencyPropertyChangedEventArgs

Gets the element converted to THost. Throws appropriate exception if the element is not of the right type. Use this method in the Attach and Detach methods instead of safe casts.

C#
protected THost RequestElementType<THost>(object element) where THost : DependencyObject
Parameters:elementobject

The element to convert.

Returns:

THost

The element of type THost.