Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Winrt xaml 如何使用c语言获取winrt xaml列系列图表的抽头列/条形图的值#_Winrt Xaml - Fatal编程技术网

Winrt xaml 如何使用c语言获取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" >

如何获取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: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。您现在可以通过单击列访问数据。