Xamarin forms C#, How to make the label change value in a listview? -
my code , listview works fine (no errors , label in listview), when click on stepper want value of label created change in listview. doesn't anything. check out code below.
my xaml:
<stepper minimum="0" maximum="10" increment="0.1" valuechanged="onsteppervaluechanged" /> <label text="{binding amount}" />
my listview code figured out , add public class string in listview give value of 0.
public class theinfo { public string amount { get; set; } } mylist.add (new theinfo () {amount = "0" }); //i add in listviewcode. works, 0 in listview on every created row. async void onsteppervaluechanged(object sender, valuechangedeventargs e) { new theinfo () {amount = string.format ("stepper value {0:f1}", e.newvalue) }; //i reckon have convert amount label.text somehow? }
Comments
Post a Comment