How to Disable Scrolling of listview on a Button Click Event

Rohit_ArnavRohit_Arnav USMember ✭✭

Hi All
I want to ask , I have a ListView and above ListView i have a button , I want to stop scrolling of the ListView when the button is clicked any idea how to implement that because i have tried many thing but can't succeeded.
please help me!

Posts

  • TobnilTobnil SEMember ✭✭

    Any luck with this?

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    @Rohit_Arnav said:
    Hi All
    I want to ask , I have a ListView and above ListView i have a button , I want to stop scrolling of the ListView when the button is clicked any idea how to implement that because i have tried many thing but can't succeeded.
    please help me!

    I am not clear of what your actual requirement is. ListView is inherently scrollable. Its scrolling begins or stops by your guestures. It doesn't scroll infinitely. A sort of inertia built into it. So when you swipe up or down it scrolls but stops automatically. Do you want to freeze the scrolling action only? I don't see use of any such requirement. So can you explain what you want actually, so that we can suggest a solution.

  • Rohit_ArnavRohit_Arnav USMember ✭✭

    @ShantimohanElchuri Actually i have a list with Images and i want to draw on a particular image before drawing i want to stop the scrolling of list and after that when again i clicked on button the list get scrolled again .. i was using SkiaSharp to draw over image and i do the trick for stopping the list scrolling on touch effect event but because of this when we drag to draw the line over image it did,t draw over image only a dot is visible at the starting point of drawing.. this is because touch effect was not fired again...

  • Rohit_ArnavRohit_Arnav USMember ✭✭
    edited September 14

    @Tobnil yes i am able to stop scrolling , but not able to draw when i stop the scrolling .

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    @Rohit_Arnav said:
    @ShantimohanElchuri Actually i have a list with Images and i want to draw on a particular image before drawing i want to stop the scrolling of list and after that when again i clicked on button the list get scrolled again .. i was using SkiaSharp to draw over image and i do the trick for stopping the list scrolling on touch effect event but because of this when we drag to draw the line over image it did,t draw over image only a dot is visible at the starting point of drawing.. this is because touch effect was not fired again...

    Ah! Rohit, It appears you are into very sophisticated system. One way to achieve it is:

    1. Swipe up or down to get the desired image within the viewed display.
    2. On 'LongPress' gesture on the image item, copy the image into an overlayed Frame.
    3. Draw whatever you want to on that copy of the image.
    4. On 'BackButtonPressed', ask to save the modified image.
    5. Update the image in the ListItem and remove the overlayed Framed.

    The overlayed Frame should be opaque so that the draw gestures are not transmitted to the ListView underneath. Of course, opening a new page with the Image passed on may be the best solution. But it seems you wanted a sort of 'in-place' drawing over the image.

  • Rohit_ArnavRohit_Arnav USMember ✭✭

    yes You are Right i want 'in Place' drawing without scrolling @ShantimohanElchuri , but i will try your approach , let me see what i can get from it , Thanks for your valuable time :)

Sign In or Register to comment.