Class
VisualStateBehavior

Definition

Namespace:ArtOfTest.WebAii.Design.UI.WPFToolkit

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public abstract class VisualStateBehavior

Inheritance: objectVisualStateBehavior

Derived Classes: ControlBehavior

Constructors

VisualStateBehavior()

Declaration

cs-api-definition
protected VisualStateBehavior()

Fields

VisualStateBehaviorProperty

The attached DependencyProperty for VisualStateBehavior.

Declaration

cs-api-definition
public static readonly DependencyProperty VisualStateBehaviorProperty

Field Value

DependencyProperty

Properties

TargetType

Specifies the Type of the Control that this behavior targets.

Declaration

cs-api-definition
protected abstract Type TargetType { get; }

Property Value

Type

Methods

AddValueChanged(DependencyProperty, Type, object, EventHandler)

Attaches an event handler to be called when a property changes.

Declaration

cs-api-definition
protected static bool AddValueChanged(DependencyProperty dp, Type targetType, object instance, EventHandler handler)

Parameters

dp

DependencyProperty

When this DependencyProperty changes on the instance, the handler will be called.

targetType

Type

The target type of the property or the instance if it is an attached property.

instance

object

The instance of the object.

handler

EventHandler

The handler to call.

Returns

bool

true if the handler was attached, false otherwise.

GetVisualStateBehavior(DependencyObject)

Returns the value of the VisualStateBehavior attached property.

Declaration

cs-api-definition
public static VisualStateBehavior GetVisualStateBehavior(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

VisualStateBehavior

OnAttach(Control)

Attach to the appropriate events on the instance of the control in order to update the state correctly.

Declaration

cs-api-definition
protected abstract void OnAttach(Control control)

Parameters

control

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

cs-api-definition
protected abstract void OnDetach(Control control)

Parameters

control

Control

An instance of the control.

RegisterBehavior(VisualStateBehavior)

Applies the specified behavior to all instances of the target control type.

Declaration

cs-api-definition
public static void RegisterBehavior(VisualStateBehavior behavior)

Parameters

behavior

VisualStateBehavior

The behavior being registered.

RemoveValueChanged(DependencyProperty, Type, object, EventHandler)

Declaration

cs-api-definition
protected static bool RemoveValueChanged(DependencyProperty dp, Type targetType, object instance, EventHandler handler)

Parameters

dp

DependencyProperty

targetType

Type

instance

object

handler

EventHandler

Returns

bool

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

cs-api-definition
public static void SetVisualStateBehavior(DependencyObject obj, VisualStateBehavior value)

Parameters

obj

DependencyObject

value

VisualStateBehavior

UpdateState(Control, bool)

Called to update the control's visual state.

Declaration

cs-api-definition
protected abstract void UpdateState(Control control, bool useTransitions)

Parameters

control

Control

The instance of the control being updated.

useTransitions

bool

Whether to use transitions or not.

UpdateStateHandler(object, EventArgs)

Declaration

cs-api-definition
protected abstract void UpdateStateHandler(object o, EventArgs e)

Parameters

o

object

e

EventArgs