New to Telerik UI for WPF? Start a free 30-day trial
Move the Cursor Away From the RadButton Control
Updated on Sep 15, 2025
Environment
| Product Version | 2020.3.915 |
| Product | Buttons for WPF |
Description
Using a device that supports both mouse and touch input, can cause the mouse to go to the tapped location, causing the button to apply a trigger for the IsMouseOver property.
Solution
Subscribe to the TouchUp event of the RadButton control, and use the Win32 API to manually move the cursor away from the button.
C#
[DllImport("User32.dll")]
private static extern bool SetCursorPos(int X, int Y);
private void RadNumericUpDown_TouchUp(object sender, TouchEventArgs e)
{
SetCursorPos(0, 0);
}