title: Silverlight Writeable Bitmap
body: <p>I am using the Silverlight WriteableBitmap command to render a 'Pie Chart' using the following code.</p>
  
  <pre><code>    Chart GetChart()
      {
          Chart newChart = new Chart() { Width = 100.0, 
                                         Height = 100.0  };
  
          PieSeries pieSeries = new PieSeries();
          pieSeries.SetBinding(PieSeries.ItemsSourceProperty, new Binding());
          pieSeries.DependentValueBinding = new Binding("Value");
          pieSeries.IndependentValueBinding = new Binding("Key");
          pieSeries.AnimationSequence = AnimationSequence.FirstToLast;
          pieSeries.IsSelectionEnabled = true;
          newChart.Series.Add(pieSeries);
  
          newChart.SetValue(Chart.DataContextProperty, new KeyValuePair&lt;string, int&gt;[] 
                              {
                                  new KeyValuePair&lt;string, int&gt;("Work", 9), 
                                  new KeyValuePair&lt;string, int&gt;("Driving", 2), 
                                  new KeyValuePair&lt;string, int&gt;("Family", 4), 
                                  new KeyValuePair&lt;string, int&gt;("Sleep", 8), 
                                  new KeyValuePair&lt;string, int&gt;("Friends", 1) 
                              });
          return newChart;
      }
  
      WriteableBitmap bmapPreviewCanvas = new WriteableBitmap(GetChart, null);
  </code></pre>
  
  <p>The result I was expecting is a Bitmap with a PieChart. What I got was a Bitmap with the background without any PieChart.</p>
  
  <p>Question is : What should I do to get the Pie Chart rendered in the variable 'bmapPreviewCanvas'?</p>
  
  <p>Edit : Does this have something to do with the ANIMATIONSEQUENCE ?</p>