Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyControl mc = new MyControl();
- mc.TouchDown += mc_TouchDown;
- mc.TouchUp += mc_TouchUp;
- void mc_TouchDown(object sender, TouchEventArgs e)
- {
- var mc = (MyControl)sender;
- mc.CaptureTouch(e.TouchDevice);
- }
- void mc_TouchUp(object sender, TouchEventArgs e)
- {
- var mc = (MyControl)sender;
- if (mc != null && e.TouchDevice.Captured == mc)
- {
- //Expand and show button / Collapse and hide button
- mc.ReleaseTouchCapture(e.TouchDevice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement