wpf - Binding static resource and observable collection -


i'm pretty new wpf's data binding try keep things simple possible. :) i'm trying bind static resource , observable collection together. both same type.

here's xaml:

<window x:class="databindingadaptertest.mainwindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         title="mainwindow" height="350" width="525" xmlns:lcu="http://schemas.org/">     <window.resources>         <lcu:datapoints x:key="jarppa">             <lcu:datapoint x="0" y="5"/>             <lcu:datapoint x="3" y="20"/>             <lcu:datapoint x="6" y="10"/>             <lcu:datapoint x="6" y="10"/>         </lcu:datapoints>     </window.resources>     <grid>         <lcu:chart x:name="chart1"/>         <lcu:bindingadapter name="bindingadapter1" chart="{binding elementname=chart1}">                 <lcu:bindingadapter.seriescollection>                 <lcu:chartseries points="{binding source={staticresource jarppa}}"/>             </lcu:bindingadapter.seriescollection>         </lcu:bindingadapter>     </grid> </window> 

chartseries.points (class name datapoints) observablecollection< datapoint> object , since "jarppa" same type thought bind without trouble. well, wrong...

i bind "jarppa" test chart i'm working on in vs2010 designer. i.e. render data points on screen. bindingadapter provides binding functionality chart (a temporary solution). think path property should used in case since i'm using source how can set path point whole list of datapoint objects...?

how should correctly? in advance.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -