A mouse input simulator for headless testing of Avalonia controls. Provides methods to simulate mouse events including clicks, movement, drag, and wheel scrolling.
public class MouseInputSimulator
kind:method, kind:property, kind:ctor. Press Esc to clear.MouseInputSimulator()Creates a new mouse input simulator.ModifiersGets or sets the current key modifiers for mouse events.PositionGets the current mouse position.PressedButtonGets the currently pressed mouse button.TimestampGets the current timestamp.AdvanceTime(Int32)Advances the internal timestamp by the specified number of milliseconds.ButtonDown(Interactive, MouseButton, Nullable<Point>)Simulates a mouse button press.ButtonUp(Interactive, MouseButton, Nullable<Point>)Simulates a mouse button release.Click(Interactive, Point, MouseButton, Int32)Simulates a complete click (press and release).DoubleClick(Interactive, Point, MouseButton, Int32)Simulates a double click.Drag(Interactive, Point, Point, MouseButton, Int32)Simulates a mouse drag operation.DragPath(Interactive, Point[], MouseButton, Int32)Simulates a drag with custom path.Enter(Interactive, Point)Simulates mouse entering a control.Hover(Interactive, Point, Int32)Simulates hovering over a control for a duration.HoverPath(Interactive, Point[], Int32)Simulates moving through a series of positions (e.g., for testing hover states).Leave(Interactive)Simulates mouse leaving a control.MiddleClick(Interactive, Point, Int32)Simulates a middle-click.MoveBy(Interactive, Double, Double)Moves the mouse by the specified delta.MoveTo(Interactive, Point)Moves the mouse to the specified position.Reset()Resets the simulator to its initial state.RightClick(Interactive, Point, Int32)Simulates a right-click (context menu).ScrollHorizontal(Interactive, Double, Nullable<Point>)Simulates horizontal wheel scrolling.ScrollVertical(Interactive, Double, Nullable<Point>)Simulates vertical wheel scrolling.SmoothScroll(Interactive, Vector, Int32, Nullable<Point>)Simulates smooth scrolling over time.Wheel(Interactive, Vector, Nullable<Point>)Simulates mouse wheel scrolling.