我在将值动态绑定到 WP7 中 visiblox 的 StackedColumnGraph 时遇到问题。
XAML 代码具有硬编码值..
<UserControl.Resources>
<Style x:Key="NoBorder" TargetType="Border">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Black" />
</Style>
<local:PartyList x:Key="Labour" >
<local:ElectionResult Year="1997" VotesMillions="13.5" />
<local:ElectionResult Year="2001" VotesMillions="10.7" />
<local:ElectionResult Year="2005" VotesMillions="9.6" />
<local:ElectionResult Year="2010" VotesMillions="8.6"/>
</local:PartyList>
<local:PartyList x:Key="Conservatives">
<local:ElectionResult Year="1997" VotesMillions="9.6" />
<local:ElectionResult Year="2001" VotesMillions="8.4" />
<local:ElectionResult Year="2005" VotesMillions="8.8" />
<local:ElectionResult Year="2010" VotesMillions="10.7"/>
</local:PartyList>
<local:PartyList x:Key="LibDem">
<local:ElectionResult Year="1997" VotesMillions="5.2" />
<local:ElectionResult Year="2001" VotesMillions="4.8" />
<local:ElectionResult Year="2005" VotesMillions="6.0" />
<local:ElectionResult Year="2010" VotesMillions="6.8"/>
</local:PartyList>
<local:PartyList x:Key="Others">
<local:ElectionResult Year="1997" VotesMillions="2.9" />
<local:ElectionResult Year="2001" VotesMillions="2.5" />
<local:ElectionResult Year="2005" VotesMillions="2.8" />
<local:ElectionResult Year="2010" VotesMillions="3.5"/>
</local:PartyList>
我有一个集合,其中存储了从服务获取的数据,我需要知道如何将这些值与这些硬编码值绑定以绘制图形...