Skip to content

BeginMoveDrag cannot execute with Pen or Touch #20242

@duxunmi

Description

@duxunmi

Describe the bug

Under the UOS system, PointerPress and the corresponding BeginMoveDrag on the touch screen cannot be used to drag and move windows

To Reproduce

private void logo_PointerPressed(object sender, PointerPressedEventArgs e)
{
    base.OnPointerPressed(e);
    if (e.Pointer.Type == PointerType.Mouse && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
    {
        ((AiWindowViewModel)this.DataContext).Speak = "鼠标按下";
        this.BeginMoveDrag(e);
    }
    else if(e.Pointer.Type == PointerType.Touch)
    {
        ((AiWindowViewModel)this.DataContext).Speak = "触摸按下";
        this.BeginMoveDrag(e);

    }
 
}

Expected behavior

Does PointeType.Touch affect BeginMoveDrag?

Avalonia version

11.3.9

OS

Linux

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions