VisualStateChangedEventArgs.Control Property

Definition

Gets the element that is transitioning states.

C#
public System.Windows.FrameworkElement Control { get; }

Property Value

The element that is transitioning states if the VisualStateGroup is in a ControlTemplate; otherwise, null.

Remarks

When the VisualStateGroup is set on a FrameworkElement that is not in a ControlTemplate, the Control property is null and you should use the StateGroupsRoot property.

Applies to

Produit Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10