Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Is it possible to gain the number of elements in an ObservableCollection regardless of it's type?

$
0
0

I have a series of pages that are using an inventory that is an ObservableCollection<myType>() but there are multiple instances with different myTypes. I want to make a converter that is going to display or hide a page element based on whether or not this list is populated.
Basically the functional code of the converter would look like

            return (((ObservableCollection)value).Count) < 1);

But I have to type the ObservableCollection to be able to get to the count.

Is there a way to cast this so I can just see how many elements exist in the collection?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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