picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.53k stars 318 forks source link

Add Control.IsMouseCaptured, CaptureMouse, and ReleaseMouseCapture APIs #2609

Closed cwensley closed 5 months ago

cwensley commented 5 months ago

This adds the ability to capture the mouse to a particular control/window until ReleaseMouseCapture is called. You can also tell if the mouse is captured during a mouse down/drag/mouse up operation with the IsMouseCaptured property.

New APIs:

class Control
{
  public bool IsMouseCaptured { get; }
  public bool CaptureMouse();
  public void ReleaseMouseCapture();
}