internal void InvokeImpl(FrameworkElement stateTarget)
 {
     if (stateTarget != null)
     {
         VisualStateUtilities.GoToState(stateTarget, StateName, UseTransitions);
     }
 }
        protected override void OnTargetChanged(FrameworkElement oldTarget, FrameworkElement newTarget)
        {
            base.OnTargetChanged(oldTarget, newTarget);
            FrameworkElement resolvedControl = null;

            if (string.IsNullOrEmpty(base.TargetName) && !IsTargetObjectSet)
            {
                if (!VisualStateUtilities.TryFindNearestStatefulControl(base.AssociatedObject as FrameworkElement, out resolvedControl) && resolvedControl != null)
                {
                    throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "GoToStateActionTargetHasNoStateGroups", new object[1]
                    {
                        resolvedControl.Name
                    }));
                }
            }
            else
            {
                resolvedControl = base.Target;
            }
            StateTarget = resolvedControl;
        }