UXDivers / Gorilla-Player-Support

This is the public Gorilla Player support website
http://gorillaplayer.com
115 stars 17 forks source link

Binding on page #267

Closed viccotr closed 6 years ago

viccotr commented 6 years ago

Hello, please help me. How I can bind data for many controls on the page? For example page TopLvlCustomTest.xaml : `

in SampleData.json "TopLvlCustomTest.xaml": [ { "Id": "Jo4hn", "HelloText": "sdfsdf", "Photo": "pic_logo_small.png" }, { "Id": "Jo3hn", "HelloText": "sdfsdf", "Photo": "pic_logo_small.png" }, { "Id": "Jo2hn", "HelloText": "sdfsdf", "Photo": "pic_logo_small.png" }, { "Id": "Jo1hn", "HelloText": "sdfsdf", "Photo": "pic_logo_small.png" }, ], { "TextLabel": "TestTextVal", "ImageSourceImg": "pic_logo_small.png" } ` I see data in listView, but Label & Image - is empty. Why? Please help. Thanks

jpbrocca commented 6 years ago

Hi @viccotr,

The main reason is that you have not structured your JSON properly to get the binding as it is in your image.

In order to get the bindings for your image and label you need to put binding properties and values at the root level of your page JSON object:

"TopLvlCustomTest.xaml": {
   [ ... ],
   "ImageSourceImg": "pic_logo_small.png",
   "TextLabel": "TestTextVal"
}

Best, JP

viccotr commented 6 years ago

Thanks a lot!