开发者

Gridsplitter and Touch

I am usi开发者_运维知识库ng a GridSplitter to resize columns (what else :)). Works fine. However, I am evolving in a Surface V2 environment and if I use touch simulation the Touch events are not transmitted to my dear GridSplitter.

Any hint on how to make that work?


Just register the event like this:

YourGridSplitter.PreviewDragEnter += new DragEventHandler(YourGridSplitter_PreviewDragEnter);

void YourGridSplitter_PreviewDragEnter(object sender, DragEventArgs e)
{
   // nothing here
}


You need to capture the touchdevice.

gs.PreviewTouchDown += (s, e) => { e.TouchDevice.Capture((s as UIElement)); };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜