ClassVisualStateBehavior
Definition
Namespace:ArtOfTest.WebAii.Design.UI.WPFToolkit
Assembly:ArtOfTest.WebAii.Design.dll
Syntax:
public abstract class VisualStateBehavior
Inheritance: objectVisualStateBehavior
Derived Classes:
Constructors
VisualStateBehavior()
Declaration
protected VisualStateBehavior()
Fields
VisualStateBehaviorProperty
The attached DependencyProperty for VisualStateBehavior.
Declaration
public static readonly DependencyProperty VisualStateBehaviorProperty
Field Value
Properties
TargetType
Specifies the Type of the Control that this behavior targets.
Methods
AddValueChanged(DependencyProperty, Type, object, EventHandler)
Attaches an event handler to be called when a property changes.
Declaration
protected static bool AddValueChanged(DependencyProperty dp, Type targetType, object instance, EventHandler handler)
Parameters
dp
When this DependencyProperty changes on the instance, the handler will be called.
targetType
The target type of the property or the instance if it is an attached property.
instance
The instance of the object.
handler
The handler to call.
Returns
true if the handler was attached, false otherwise.
GetVisualStateBehavior(DependencyObject)
Returns the value of the VisualStateBehavior attached property.
Declaration
public static VisualStateBehavior GetVisualStateBehavior(DependencyObject obj)
Parameters
obj
Returns
OnAttach(Control)
Attach to the appropriate events on the instance of the control in order to update the state correctly.
Declaration
protected abstract void OnAttach(Control control)
Parameters
control
An instance of the control.
OnDetach(Control)
Detach to the appropriate events on the instance of the control in order to not leak memory.
Declaration
protected abstract void OnDetach(Control control)
Parameters
control
An instance of the control.
RegisterBehavior(VisualStateBehavior)
Applies the specified behavior to all instances of the target control type.
Declaration
public static void RegisterBehavior(VisualStateBehavior behavior)
Parameters
behavior
The behavior being registered.
RemoveValueChanged(DependencyProperty, Type, object, EventHandler)
Declaration
protected static bool RemoveValueChanged(DependencyProperty dp, Type targetType, object instance, EventHandler handler)
Parameters
dp
targetType
instance
handler
Returns
SetVisualStateBehavior(DependencyObject, VisualStateBehavior)
Sets the value of the VisualStateBehavior attached property. Setting the value will attach the behavior to the instance of the control.
Declaration
public static void SetVisualStateBehavior(DependencyObject obj, VisualStateBehavior value)
Parameters
obj
value
UpdateState(Control, bool)
Called to update the control's visual state.