How to implements Like & Dislike button

abdullahtahan.7433abdullahtahan.7433 SAMember ✭✭
edited June 2016 in Xamarin.Forms

hey guys i was wondering if you could help me to implement my project im facing a problem in my two buttons in my listview that if i click "like" i want to change the "dislike" button . the problem i'm facing that i can't get access to the other button since i can't call the X:name from my listview .

my view "like" button:



public async void SetLike (object sender, EventArgs e)
**Here i want to change the other button property **

Best Answer


  • abdullahtahan.7433abdullahtahan.7433 SAMember ✭✭

    what i've done so far is assigning both buttons to same click method and then get the current button
    var b = (Button)sender;
    Joke t = (Joke)b.CommandParameter;
    var x =((StackLayout)b.ParentView);

    i've upcast my button to ParentView but there's no name property i'll make my condition based on the sequence :)

    ddd.tiff 148.2K
Sign In or Register to comment.