Table of Contents

Class GoToStateAction

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

An action that will transition a FrameworkElement to a specified VisualState when invoked.

public class GoToStateAction : TargetedTriggerAction<FrameworkElement>, IAnimatable, IAttachedObject
Inheritance
GoToStateAction
Implements
Inherited Members
Extension Methods

Remarks

If the TargetName property is set, this action will attempt to change the state of the targeted element. If not, it walks the element tree in an attempt to locate an alternative target that defines states. ControlTemplate and UserControl are two common possibilities.

Fields

StateNameProperty

public static readonly DependencyProperty StateNameProperty

Field Value

DependencyProperty

UseTransitionsProperty

public static readonly DependencyProperty UseTransitionsProperty

Field Value

DependencyProperty

Properties

StateName

The name of the VisualState.

public string StateName { get; set; }

Property Value

string

UseTransitions

Determines whether or not to use a VisualTransition to transition between states.

public bool UseTransitions { get; set; }

Property Value

bool

Methods

Invoke(object)

This method is called when some criteria is met and the action is invoked.

protected override void Invoke(object parameter)

Parameters

parameter object

Exceptions

InvalidOperationException

Could not change the target to the specified StateName.

OnTargetChanged(FrameworkElement, FrameworkElement)

Called when the target changes. If the TargetName property isn't set, this action has custom behavior.

protected override void OnTargetChanged(FrameworkElement oldTarget, FrameworkElement newTarget)

Parameters

oldTarget FrameworkElement
newTarget FrameworkElement

Exceptions

InvalidOperationException

Could not locate an appropriate FrameworkElement with states.