Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Display list of items without using ListView

$
0
0

Hi everyone.
I stuck with a problem of displaying list of items without using ListView.
I have a ListView with ItemSource property bound to ObservableCollection of Company objects. Each of that company has a list of phone numbers. The number of phone numbers may vary from 1 to 5. Now I need to show all phone numbers of each company within ListView's ItemTemplate as a list of labels inside StackLayout. I tried to bind Children property of StackLayout to a list of generated Labels through a custom converter in the XAML, but found that Children property is not bindable.
I couldn't figure out how to achieve desired result using code either, because at the moment of ListView generation the list of companies is not yet ready.
I guess I can subscribe to the event of the view model which fetches the list of companies and render ListView when the appropriate property is set, and before that show other page with activity indicator. But that doesn't seem like a good approach for me. Besides that I'd like to use XAML as much as possible.
Thanks in advance.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>