开发者

Gridsplitter and Touch

开发者 https://www.devze.com 2023-03-17 03:16 出处:网络
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 trans

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

精彩评论

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