WEB开发网
开发学院图形图像Flash 使用Silverlight Toolkit绘制图表(下)--饼图,折... 阅读

使用Silverlight Toolkit绘制图表(下)--饼图,折线图,散点图

 2009-02-16 11:57:09 来源:WEB开发网   
核心提示: <controls:DockPanelLastChildFill="False"controls:DockPanel.Dock="Right"><StackPanelx:Name="InformationPanel&quo

<controls:DockPanelLastChildFill="False"controls:DockPanel.Dock="Right">
  <StackPanel x:Name="InformationPanel"controls:DockPanel.Dock="Top"Margin="5">
    <TextBlockText="SelectedCityDetails"FontWeight="Bold"/>
    <StackPanelOrientation="Horizontal">
      <TextBlockText="Name:"/>
      <TextBlockText="{BindingName}"/>
    </StackPanel>
    <StackPanelOrientation="Horizontal">
      <TextBlockText="Population:"/>
      <TextBlockText="{BindingPopulation}"/>
    </StackPanel>
  </StackPanel>
  <Button Content="取消选中"Click="Unselect_Click"Margin="5"controls:DockPanel.Dock="Bottom"/>
</controls:DockPanel>

这里,我们只要在PieSample.Xaml.cs文件中编写事件BarSeries_SelectionChanged处理代码即可:

privatevoidBarSeries_SelectionChanged(objectsender,SelectionChangedEventArgse)
{
  InformationPanel.DataContext=(1<=e.AddedItems.Count)?e.AddedItems[0]:null;
}
privatevoidUnselect_Click(objectsender,System.Windows.RoutedEventArgse)
{
  (FunctionSeriesSample.Series[0]asPieSeries).SelectedItem=null;
}

上一页  1 2 3 4 5 6 7  下一页

Tags:使用 Silverlight Toolkit

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接