Update a label in the listview when button is clicked on the same list item MVC

Hi

I have a Label and Image in a List Item. I want to update the value of the label when image is pressed. How can i acheive it?

Answers

  • DroidDevDroidDev Member

    Any Help????

  • JohnHJohnH GBMember ✭✭✭✭✭
    edited December 2018

    @DroidDev said:
    Any Help????

    You were expecting help within 45 minutes of posting?

    To point you in the right direction, your listview should be bound to a list of models. The image source is bound to a property on the model. The label is bound to a property on the model. The tab gesture on the image then just updates the model property that is bound to the label. Simples.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited December 2018

    Clearly you haven't worked a single tutorial... read any of the free learning material etc. or you wouldn't have to ask a question that would have been covered in your first 3 hours of a blog post.

    I'm going to suggest something you won't want to hear.
    Learn first. Develop second. How can you build a program if you haven't learned the foundation concepts like MVVM or MessagingCenter?

    Frankly - the time you're wasting trying to figure stuff out on your own, taking wrong paths, starting over etc. could have been spent on learning then your app would have taken the correct direction the first time out - for no extra time. So many noobies take this "no time to study, I have to bang this out now and learn as I go" direction - and it rarely works out well.

    Had you taken the time to do Xamarin University or even a short blog course, you would have started out doing MVVM right off that bat. you would learned how MessagingCenter works for communication between those ViewModels.

    Stop working on this project for at least a couple weeks to a month. Just work on learning. WORK some tutorials from start to end. Build the sample apps the authors are walking you through. Then dissect those apps to gain real comprehension of all the relationships and moving parts. Then take that new understanding and start version two of this app from scratch.

    Free textbook
    https://blogs.msdn.microsoft.com/microsoft_press/2016/03/31/free-ebook-creating-mobile-apps-with-xamarin-forms/

    Xamarin University
    https://university.xamarin.com/

    Xamarin University has dozens of tutorial classes on YouTube if you use their search feature.

    And of course there are dozens of Xamarin bloggers out there.
    http://redpillxamarin.com/2018/03/12/2018-101-vs2017-new-solution/

Sign In or Register to comment.