skokon
Topic Author
Posts: 11
Joined: 09 Jun 2024, 15:55

ScrollViewer Panning

23 Jul 2024, 19:41

Hello,

I'm having trouble enabling panning using a ScrollViewer

I've set up my ScrollViewer with PanningMode="VerticalOnly" and set Focusable to True. While the vertical scroll bar works fine, I can't drag to scroll (panning) the content to scroll the view.
 
User avatar
sfernandez
Site Admin
Posts: 3112
Joined: 22 Dec 2011, 19:20

Re: ScrollViewer Panning

24 Jul 2024, 13:21

Hi, panning only works with manipulation events, so only if touch input is injected into the View.
    /// Notifies that a finger touched the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchDown(int x, int y, uint64_t id) = 0;

    /// Notifies that a finger moved on the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchMove(int x, int y, uint64_t id) = 0;

    /// Notifies that a finger raised off of the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchUp(int x, int y, uint64_t id) = 0;
You can also test it by emulating touch events with the mouse by calling
    /// Indicates if touch input events are emulated by the mouse
    virtual void SetEmulateTouch(bool emulate) = 0;
 
skokon
Topic Author
Posts: 11
Joined: 09 Jun 2024, 15:55

Re: ScrollViewer Panning

26 Jul 2024, 11:28

Hi, panning only works with manipulation events, so only if touch input is injected into the View.
    /// Notifies that a finger touched the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchDown(int x, int y, uint64_t id) = 0;

    /// Notifies that a finger moved on the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchMove(int x, int y, uint64_t id) = 0;

    /// Notifies that a finger raised off of the screen. Origin is in the upper-left corner.
    /// Returns true if event was handled
    virtual bool TouchUp(int x, int y, uint64_t id) = 0;
You can also test it by emulating touch events with the mouse by calling
    /// Indicates if touch input events are emulated by the mouse
    virtual void SetEmulateTouch(bool emulate) = 0;
Setting Emulate Touch to true in the NoesisInstance did it, but MouseOver Effects are not called anymore, should i open a ticket?
 
User avatar
jsantos
Site Admin
Posts: 4070
Joined: 20 Jan 2012, 17:18
Contact:

Re: ScrollViewer Panning

29 Jul 2024, 15:00

Mouse events do not support acceleration by design. Additionally, touch input does not have the concept of "focus".

The "Emulate Touch" feature is intended for testing mobile interactions on a desktop development machine.

Who is online

Users browsing this forum: Bing [Bot] and 3 guests