title: WPF - MVVM not setting Path Style when binding
body: <p>I have my tab item declared as below:</p>
  
  <pre><code>  &lt;TabItem &gt;
                  &lt;TabItem.HeaderTemplate&gt;
                      &lt;DataTemplate DataType="pricefiles:ConfigureViewModel"&gt;
                          &lt;StackPanel Orientation="Horizontal"&gt;
                              &lt;Path Style="{Binding StandardEnabled}"/&gt;
                              &lt;TextBlock Text="Standard" Margin="5" /&gt;
                          &lt;/StackPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/TabItem.HeaderTemplate&gt;
                  &lt;Grid Background="#FFE5E5E5"&gt;
                      &lt;Standard:StandardView /&gt;
                  &lt;/Grid&gt;
              &lt;/TabItem&gt;
  </code></pre>
  
  <p>And then in my view model i have:</p>
  
  <pre><code>    private Style _standardEnabled;
  
      public Style StandardEnabled
      {
          get { return _standardEnabled; }
          set { SetProperty(ref _standardEnabled, value); }
      }
  
   public ConfigureViewModel(SYSTEM_Account account)
      {
          try
          {
              Account = account;
              StandardEnabled = (Style) Application.Current.FindResource("HeadersIcon");
  
          }
          catch (Exception ex)
          {
  
  
          }
  
      }
  </code></pre>
  
  <p>The style is in a resource dictionary declared as:</p>
  
  <pre><code>    &lt;Style x:Key="HeadersIcon" TargetType="Path"&gt;
      &lt;Setter Property="Data" Value="M0,13.333001L35.555001,13.333001 35.555001,33.778223C35.555001,35.250969,34.36089,36.445002,32.88818,36.445002L2.666523,36.445002C1.1938604,36.445002,2.4359167E-07,35.250969,0,33.778223z M3.2485678,6.19415L3.2485678,8.0274701 22.415489,8.0274701 22.415489,6.19415z M3.2485678,2.6108398L3.2485678,4.44415 22.415489,4.44415 22.415489,2.6108398z M2.666523,0L32.88818,0C34.36089,0,35.555001,1.19415,35.555001,2.6666899L35.555001,10.222 0,10.222 0,2.6666899C2.4359167E-07,1.19415,1.1938603,0,2.666523,0z" /&gt;
      &lt;Setter Property="RenderTransformOrigin" Value="0.5,0.5"&gt;&lt;/Setter&gt;
      &lt;Setter Property="Stretch" Value="Uniform"&gt;&lt;/Setter&gt;
      &lt;Setter Property="Fill" Value="#FF000000"&gt;&lt;/Setter&gt;
      &lt;Setter Property="Width" Value="16"&gt;&lt;/Setter&gt;
      &lt;Setter Property="Height" Value="16"&gt;&lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>When ever this code fires I can see the resource (style) within the StandardEnabled property however it then doesn't get databound to the Path.</p>
  
  <p>I'm going to want to databind the with different resources depending on different circumstances.</p>
  
  <p>EDIT:</p>
  
  <p>The view/viewmodel is initialised when the user presses a button on a parent window:</p>
  
  <pre><code>try
  {
      var tmpVm = new ConfigureViewModel(SystemAccount);
      var tmp = new ConfigureView(tmpVm);
      tmp.ShowDialog();
  }
  catch (Exception ex)
  {
  
  }
  </code></pre>
  
  <p>To initialize the data context:</p>
  
  <pre><code>public ConfigureView(ConfigureViewModel configureViewModel)
  {
      InitializeComponent();
      DataContext = configureViewModel;
  }
  </code></pre>