Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/285.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
C# 带有Surface API的StackPanel-决不触摸EscapturedWithin_C#_Wpf_Drag And Drop_Touch_Pixelsense - Fatal编程技术网

C# 带有Surface API的StackPanel-决不触摸EscapturedWithin

C# 带有Surface API的StackPanel-决不触摸EscapturedWithin,c#,wpf,drag-and-drop,touch,pixelsense,C#,Wpf,Drag And Drop,Touch,Pixelsense,我一直在尝试创建一个可视化工具,用于在着陆事件中在WPF中拖放堆栈面板。我已经成功地为SurfaceListBoxItem完成了这项工作,但没有为StackPanel完成这项工作。我已经将范围缩小到这样一个事实,SurfaceListBoxItem的TouchesCapturedWithin属性是1(应该是这样),但对于StackPanel(即使在StackPanel的触地事件处理程序中查看此属性时也是如此) private void stackPanel1\u接地(对象发送方,TouchEve

我一直在尝试创建一个可视化工具,用于在着陆事件中在WPF中拖放
堆栈面板
。我已经成功地为
SurfaceListBoxItem
完成了这项工作,但没有为
StackPanel
完成这项工作。我已经将范围缩小到这样一个事实,
SurfaceListBoxItem
TouchesCapturedWithin
属性是1(应该是这样),但对于
StackPanel
(即使在
StackPanel
触地
事件处理程序中查看此属性时也是如此)

private void stackPanel1\u接地(对象发送方,TouchEventArgs e)
{
IEnumerable touchs=(发送器作为StackPanel)。touch EscapturedWithin;
}
我需要这个
IEnumerable
在代码的后面,所以我假设这就是为什么我在拖动时看不到任何东西的原因

非常感谢


Dan使用TouchesOver属性对其进行排序

    private void stackPanel1_TouchDown(object sender, TouchEventArgs e)
    {
        IEnumerable<TouchDevice> touches = (sender as StackPanel).TouchesCapturedWithin;
    }