title: wpf chart print (system.windows.controls.datavisualization.toolkit)
body: <p>I'm using a Bar Chart in the system.windows.controls.datavisualization.toolkit in a WPF/C# project. I would like to print this chart on a page, but it appears none of the binding are executed before printing. I end up with an empty square where the chart should be.</p>
  
  <p>My XAML code looks like this (I've ommitted layout things)
      </p>
  
  <pre><code>&lt;Grid x:Name="LayoutRoot"&gt;
      &lt;chartingToolkit:Chart x:Name="GUIchart" Style="{StaticResource TheGUIChartStyle}" FontSize="12"&gt;
          &lt;chartingToolkit:BarSeries x:Name="Series" ItemsSource="{Binding}"&gt;
              &lt;chartingToolkit:BarSeries.DependentRangeAxis&gt;
                  &lt;chartingToolkit:LinearAxis x:Name="Xaxis" Minimum="0" Maximum="100" Interval="10" ShowGridLines="True" Orientation="X"/&gt;
              &lt;/chartingToolkit:BarSeries.DependentRangeAxis&gt;
          &lt;/chartingToolkit:BarSeries&gt;
      &lt;/chartingToolkit:Chart&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>In c# I'm adding some titels and the bindings:</p>
  
  <pre><code>// set the X-axis title
  Xaxis.Title = "Score in %";
  
  // do the binding
  Series.IndependentValuePath = "Name";
  Series.DependentValuePath = "Score";
  Series.ItemsSource = scores;
  </code></pre>
  
  <p>When debugging, this binding is actually executed before the chart is being add to the page. Nevertheless, I end up with an "empty" chart.</p>