图表系列数据点击通过Kinect V2

时间:2015-07-13 09:23:55

标签: wpf kinect

我正在开发一个通过Kinect运行的WPF应用程序。我正在使用Kinect for Windows V2.0。 (我已经参考了Kinect Code样本V2中给出的Controls Basics代码)

在我的WPF应用程序中,我有一个Line系列图表控件。 System.Windows.Controls.DataVisualization.Charting

我想通过Kinect手势点击一个系列点。 我怎么能这样做?我尝试用普通的手形指针点击手势。但它不起作用。

修改

我希望数据点可以点击。意味着我已经处理了折线图的SelectedChanged事件。设置IsSelectable = true。因此,当我单击鼠标点时,我能够获得相应的数据点详细信息。我想通过Kinect发生同样的事情。以下是折线图的代码。

List<KeyValuePair<string, int>> valueList = new List<KeyValuePair<string, int>>();
valueList.Add(new KeyValuePair<string, int>("Developer", 60));
valueList.Add(new KeyValuePair<string, int>("Misc", 20));
valueList.Add(new KeyValuePair<string, int>("Tester", 50));
valueList.Add(new KeyValuePair<string, int>("QA", 30));
valueList.Add(new KeyValuePair<string, int>("Project Manager", 40));
lineChart.DataContext = valueList;

1 个答案:

答案 0 :(得分:0)

我刚为任何Line系列图表添加了标准代码。我希望数据点可以点击。意味着我处理了折线图的SelectedChanged事件。 Set IsSelectable = true。因此,当我单击鼠标点时,我能够获得相应的数据点详细信息。 我想通过Kinect发生同样的事情。 以下是折线图的代码。

List<KeyValuePair<string, int>> valueList = new List<KeyValuePair<string, int>>();
valueList.Add(new KeyValuePair<string, int>("Developer", 60));
valueList.Add(new KeyValuePair<string, int>("Misc", 20));
valueList.Add(new KeyValuePair<string, int>("Tester", 50));
valueList.Add(new KeyValuePair<string, int>("QA", 30));
valueList.Add(new KeyValuePair<string, int>("Project Manager", 40));
lineChart.DataContext = valueList;
相关问题