title: How can I make a XAML Trigger call a XAML Style?
body: <p>This style correctly fades my toolbar in or out based on the changing of a ViewModel Property:</p>
  
  <pre><code>&lt;Style x:Key="PageToolBarStyle" TargetType="Border"&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding PageToolBarVisible}" Value="true"&gt;
  
              &lt;DataTrigger.EnterActions&gt;
                  &lt;BeginStoryboard&gt;
                      &lt;Storyboard&gt;
                          &lt;DoubleAnimation
                              Storyboard.TargetProperty="Opacity"
                              From="0.0" 
                              To="1.0" 
                              Duration="0:0:2"/&gt;
                      &lt;/Storyboard&gt;
                  &lt;/BeginStoryboard&gt;
              &lt;/DataTrigger.EnterActions&gt;
  
              &lt;DataTrigger.ExitActions&gt;
                  &lt;BeginStoryboard&gt;
                      &lt;Storyboard&gt;
                          &lt;DoubleAnimation
                              Storyboard.TargetProperty="Opacity"
                              From="1.0" 
                              To="0.0" 
                              Duration="0:0:2"/&gt;
                      &lt;/Storyboard&gt;
                  &lt;/BeginStoryboard&gt;
              &lt;/DataTrigger.ExitActions&gt;
  
          &lt;/DataTrigger&gt;
  
          &lt;Trigger Property="Opacity" Value="0"&gt;
              &lt;Setter Property="Visibility" Value="Collapsed"/&gt;
          &lt;/Trigger&gt;
  
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>However, when the <strong>application loads</strong> the status of the toolbar (faded out or in) is <strong>not in sync</strong> with the value of the ViewModel property (true or false). So I want to <strong>force this style to be executed</strong> upon loading the window, what is the syntax to do this, here is pseudo code of what I want to do:</p>
  
  <pre><code>&lt;Window.Triggers&gt;
      &lt;EventTrigger RoutedEvent="FrameworkElement.Loaded"&gt;
          &lt;EventTrigger.Actions&gt;
  
             &lt;!-- PSEUDO-CODE: --&gt;
              &lt;ExecuteTriggerStyle StyleToExecute="{StaticResource PageToolBarStyle}"/&gt;
  
          &lt;/EventTrigger.Actions&gt;
      &lt;/EventTrigger&gt;
  &lt;/Window.Triggers&gt;
  </code></pre>