Winrt xaml 如何使用c语言获取winrt xaml列系列图表的抽头列/条形图的值#
如何获取winrt xaml列系列图的抽头列/条形图的值。 我想使用每个条形图的值打开其他图表 我的代码是:Winrt xaml 如何使用c语言获取winrt xaml列系列图表的抽头列/条形图的值#,winrt-xaml,Winrt Xaml,如何获取winrt xaml列系列图的抽头列/条形图的值。 我想使用每个条形图的值打开其他图表 我的代码是: <Charting:Chart x:Name="chart" Title="My Performance" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" Width="895" Height="548" Foreground="Black" FontSize="10" >
<Charting:Chart x:Name="chart" Title="My Performance" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" Width="895" Height="548" Foreground="Black" FontSize="10" >
<Charting:ColumnSeries x:Name="mychart" Padding="10" BorderThickness="5" BorderBrush="#FF233083" Background="Yellow" IndependentValuePath="TestCode" DependentValuePath="Percentage" IsSelectionEnabled="True" Margin="0,0,0,4" Tapped="mychart_Tapped" >
我没有从selecteditem中获取值,谢谢……。您没有从selecteditem中获取值是什么意思?您在专栏系列的
点击事件中有什么收获吗?我可能建议编辑ColumnSeries模板并添加按钮包装,在VM中将包装器的命令设置为ICommand
,并在CommandParameter
中将DataContext
作为绑定传递。实际上,我在运行时使用column series意味着从服务器端编码添加图表,如'ColumnSeries columnchart=new ColumnSeries,并生成一个事件当然。我可以点击打开其他东西,但不知道如何获取列系列中每个条的值…它们是否在图表中可用。系列
?因为我正在使用类似“ColumnSerials columnchart=new colmnseries”的选项,然后将此系列添加到图表中,该图表在xaml页面中获取,如上面的编码“”所示,你说你不能得到每个条的值。按照我在第一次评论中说的去做。在ColumnSeries项目样式中创建按钮。将该按钮的命令绑定到VM中的ICommand。使用空绑定将条的DataContext放入CommandParameter。您现在可以通过单击列访问数据。