Files
Toolkit2/Toolkit.Windows/PointerLocationExtensions.cs
2024-11-02 20:57:13 +00:00

10 lines
315 B
C#

namespace Toolkit.Windows;
public static class PointerLocationExtensions
{
public static bool IsWithinBounds(this PointerLocation args, Rect bounds) => args.X >= bounds.X
&& args.X <= bounds.X + bounds.Width
&& args.Y >= bounds.Y
&& args.Y <= bounds.Y + bounds.Height;
}