Git Product home page Git Product logo

Comments (7)

robloo avatar robloo commented on May 24, 2024 1

I agree it would be great to make this work the same on desktop. However,

  1. WinUI does NOT support pull to refresh on desktop. Avalonia followed upstream WinUI here.
  2. Pointer presses are handled differently. This may be difficult to do.

from avalonia.

emmauss avatar emmauss commented on May 24, 2024 1

Actions that would fall under gestures aren't intuitive when using the mouse, especially when the user expects a refresh button or hotkey. The user wouldn't know that the gesture is available with the mouse pointer, even if it's implemented.

from avalonia.

gentledepp avatar gentledepp commented on May 24, 2024

Thanks for responding! I was also a contributor on Xamarin.Forms back in the days and never got a response anywhere near as fast - if ever!

Regarding 1: Well, maybe we can let the developer decide if he wants to opt in this feature. May be feasible to disable it by default... I don't know.

Regarding 2: Isn't avalonia following WPF "design"?
In WPF, there were "PreviewEvents" that you could hook into. That way, the refreshcontainer would not interfere with the "PointerPressed" event logic of the ListBox item.

from avalonia.

timunie avatar timunie commented on May 24, 2024

In WPF, there were "PreviewEvents" that you could hook into. That way, the refreshcontainer would not interfere with the "PointerPressed" event logic of the ListBox item.

We rarely need preview events. Most of the time (not always) tunnelling events is enough.

from avalonia.

gentledepp avatar gentledepp commented on May 24, 2024

I see. But, coming from WPF, [the docs on tunneling events)[https://docs.avaloniaui.net/docs/get-started/wpf/tunnelling-events] do not make things clear to me. I'm sorry.

Can I simply change the PullGestureRecognizer to subscribe to (what is it subscribed to anyways - the parent control of the scrollviewer?) "the thing" using a tunneling approach instead of ho it does it's thing currently?

It would really be great to have the PullGestureRecognizer handle this event before any other part of the UI

from avalonia.

gentledepp avatar gentledepp commented on May 24, 2024

Well... I disaggree - some "not so native" users think that anything that works on a tablet, also works on desktop. They simply cannot differentiate - at least that is our experience.

But I understand your concern.
Could we at least make this "overridable" in the PullGestureRecognizer, so we can cleanly override this behavior?

from avalonia.

emmauss avatar emmauss commented on May 24, 2024

The user isn't able to provide their own pull gesture recognizer since the code that handles gestures in PullRefresh is internal.
Solving this #13645 should make it possible to use touch gestures with mouse.

from avalonia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.