Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PointerTouchPadGestureSwipe not work in macos #16050

Closed
jealfeae opened this issue Jun 18, 2024 · 0 comments
Closed

PointerTouchPadGestureSwipe not work in macos #16050

jealfeae opened this issue Jun 18, 2024 · 0 comments

Comments

@jealfeae
Copy link

jealfeae commented Jun 18, 2024

Describe the bug

PointerTouchPadGestureSwipe not work in macos ,but PointerTouchPadGestureRotate and PointerTouchPadGestureMagnify work fine .

To Reproduce

using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Platform;
using System;
using System.Diagnostics;

namespace AvaloniaApplication2
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
SetGestureHandlers(this);
}

    private void SetGestureHandlers(Control? control)
    {
        if (control == null)
        {
            return;
        }
       
        control.AddHandler(Gestures.PointerTouchPadGestureSwipeEvent, (s, e) =>
        {
            Debug.WriteLine("SwipeEvent");
        });
      
        control.AddHandler(Gestures.PointerTouchPadGestureMagnifyEvent, (s, e) =>
        {
            Debug.WriteLine("MagnifyEvent");
        });
      
        control.AddHandler(Gestures.PointerTouchPadGestureRotateEvent, (s, e) =>
        {
            Debug.WriteLine("RotateEvent");
        });

    }

}

}

Expected behavior

should log SwipeEvent string

Avalonia version

11.0.10

OS

macOS

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants