title: How to change templated control's properties from VisualState?
body: <p>If I define VisualStates from within a control template, is it possible to change the properties of the templated control itself from a storyboard? Here's a quick example:</p>
  
  <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
    &lt;Window.Template&gt;
      &lt;ControlTemplate TargetType="{x:Type Window}"&gt;
        &lt;Grid&gt;
          &lt;VisualStateManager.VisualStateGroups&gt;
            &lt;VisualStateGroup x:Name="WindowStyleStates"
                              x:Uid="WindowStyleStates"&gt;
              &lt;Storyboard x:Uid="Storyboard_1"&gt;
                &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="?????"
                                               Storyboard.TargetProperty="ResizeMode"&gt;
                  &lt;DiscreteObjectKeyFrame KeyTime="0"
                                          Value="CanResizeWithGrip" /&gt;
                &lt;/ObjectAnimationUsingKeyFrames&gt;
              &lt;/Storyboard&gt;
            &lt;/VisualStateGroup&gt;
          &lt;/VisualStateManager.VisualStateGroups&gt;
        &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
    &lt;/Window.Template&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>The problem is that the storyboards only have access to the objects defined within the grid. If I'm defining a controltemplate for a Window, why can't I change values on the Window I'm templating. </p>