In my app I have a tilelist that is populated by a default dataprovider that I've set up and it's dataprovider then changes based on buttons that the user clicks. Basically I have set up 5 arrays as dataproviders, 5 buttons and a tilelist. The dataprovider of the tilelist changes to one of the 5 dataproviders depending on what button is clicked.
The tilelist has a set width and height which allows for 3 items in each row and 3 items in each column (so 9 items would fill it) but what I want is for the height to automatically change based on the amount of items that it contains i.e. if a dataprovider is selected that contains, for example, 12 items the height will expand to accomodate this BUT when a dataprovider is selected that contains 9 items or less the tilelist will revert back to it's default height.
What code would need to be applied to a tilelist to achieve this?
Is this covered elsewhere? I'm still really stuck on this.