VisualStateUtilities.TryFindNearestStatefulControl Method

Find the nearest parent which contains visual states.

Namespace: Microsoft.Expression.Interactivity
Assembly: Microsoft.Expression.Interactions (in microsoft.expression.interactions.dll)

Syntax

'Declaration
Public Shared Function TryFindNearestStatefulControl ( _
    contextElement As FrameworkElement, _
    <OutAttribute> ByRef resolvedControl As FrameworkElement _
) As Boolean
'Usage
Dim contextElement As FrameworkElement
Dim resolvedControl As FrameworkElement
Dim returnValue As Boolean

returnValue = VisualStateUtilities.TryFindNearestStatefulControl(contextElement, resolvedControl)
public static bool TryFindNearestStatefulControl (
    FrameworkElement contextElement,
    out FrameworkElement resolvedControl
)
public:
static bool TryFindNearestStatefulControl (
    FrameworkElement^ contextElement, 
    [OutAttribute] FrameworkElement^% resolvedControl
)
public static boolean TryFindNearestStatefulControl (
    FrameworkElement contextElement, 
    /** @attribute OutAttribute() */ /** @ref */ FrameworkElement resolvedControl
)

Parameters

contextElement

The element from which to find the nearest stateful control.

resolvedControl

The nearest stateful control if True; else null.

Return Value

True if a parent contains visual states; else False.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

VisualStateUtilities Class
VisualStateUtilities Members
Microsoft.Expression.Interactivity Namespace