title: how would I access this WPF XAML resource programmatically?
body: <p>how would I access this WPF XAML resource programmatically?</p>
  
  <pre><code>&lt;Grid.Resources&gt;
  &lt;Style x:Key="lineDataPointStyle" TargetType="chartingToolkit:LineDataPoint"&gt;
                          &lt;Setter Property="Background" Value="DarkGreen"/&gt;
                          &lt;Setter Property="IsTabStop" Value="False"/&gt;
                          &lt;Setter Property="Template" Value="{x:Null}"/&gt;
                      &lt;/Style&gt;
  &lt;/Grid.Resources&gt;
  </code></pre>
  
  <p>and here's the code where I want to access it from.  Note I need to programmatically create the lines:</p>
  
  <pre><code> // New Assoicated Graph Series
                  var lineSeries = new LineSeries();
                  lineSeries.ItemsSource = newSeriesCollection;
                  lineSeries.IndependentValuePath = "Second";
                  lineSeries.DependentValuePath = "Kb";
                  lineSeries.Title = kvp.Key;
                  lineSeries.DataPointStyle = (Style) this.Resources["lineDataPointStyle"];  // ** DOES NOT WORK
  </code></pre>