How can i make data binding in multiple Labels ?

I know how to use a listview to fetch data from code behind, using ItemsSource, but now i want to add content to various different Labels using data binding too without using a listview.

How can i get the data ?

Sorry in advance, im new to Xamarin.

Best Answer

Answers

  • igorkr_10igorkr_10 Member ✭✭✭

    Do you want to use something like Template but not ListView?

  • jddjdd USMember ✭✭✭

    Well, you bind the property of the label to the property of the bindingcontext like that:

                    <Label Text="{Binding DateTimeString}"
                        <Label.BindingContext>
                            <viewModels:ClockViewModel />
                        </Label.BindingContext>
                    </Label>
    
Sign In or Register to comment.