Forum Xamarin Xamarin.Forms

How to binding String Json on listview

EnesDenizEnesDeniz Member ✭✭

Hi There. I am developing an application with Xamarin Forms.
I have a JSON that returns string values.
What I want to do is take certain properties of the JSON file and print them in listview cells. Please help me.

Best Answer

Answers

  • nnovalbosnnovalbos Member ✭✭

    You have to create a List from dictionary with the properties you want and assign as ItemsSource (string values)

    Then, on view:

    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <Label Text="{Binding .} />          
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
    
  • EnesDenizEnesDeniz Member ✭✭

    My problem is that I pull JSON data through the url method

Sign In or Register to comment.