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)); };
精彩评论