title: Data binding with Oxyplot in WPF
body: <p>I am struggling with several issues regarding OxyPlot in a WPF project.</p>
  
  <p>First off, I can use the Plot class or the PlotView class. What is the difference between these two classes?</p>
  
  <p>Ideally, I want to use data binding for the Model (or at least parts of it) and for the data.</p>
  
  <p>If I use PlotView, I can use Binding for the model, something like this:</p>
  
  <pre><code>&lt;oxy:PlotView Model="{Binding Model}"/&gt;
  </code></pre>
  
  <p>If I use Plot, I can use data binding for the data, something like</p>
  
  <pre><code>&lt;oxy:Plot&gt;
    &lt;oxy:Plot.Series&gt;
      &lt;oxy:LineSeries ItemsSource="{Binding Points}" /&gt;
    &lt;/oxy:Plot.Series&gt;
  &lt;/oxy:Plot&gt;
  </code></pre>
  
  <p>I can get both of these to work, but is there a way to use Binding for both the Model and the Data?</p>
  
  <p>If I use the Plot class and Binding for the data, I would at least like to use Binding for the LineColor, like this</p>
  
  <pre><code>&lt;oxy:Plot&gt;
    &lt;oxy:Plot.Series&gt;
      &lt;oxy:LineSeries ItemsSource="{Binding Points}" 
                          DataFieldX="X" 
                          DataFieldY="Y"
                          StrokeThickness="2"
                          MarkerSize="0"
                          LineStyle="Solid"
                          Color="{Binding LineColor}"
                          MarkerType="None"/&gt;
    &lt;/oxy:Plot.Series&gt;
  &lt;/oxy:Plot&gt;
  </code></pre>
  
  <p>I can't get this to work at all. The curve is always green. My LineColor property is defined with the type OxyColor. Is this the wrong type?</p>
  
  <p>I know that I have asked several questions in the same posting, but I think that they are very closely related.</p>