Hello,
I was wondering if there's a simple way to limit at max 6 items the number of items present inside a LayoutControl? I've added a control inside my ViewModel and I avoid adding more if the Count reaches 6 but the whole space is not occupied
Thanks in advance
5 Answers, 1 is accepted
The control does have a built-in mechanism for limiting the count of its items. Although I am not familiar with your setup, you should be able to achieve your goal by checking the Count of the Items collection of the control and avoid adding more elements when it reaches the required value. As to the elements not filling the entire space, such appearance would be the expected one if the elements have fixed values for their Width/Height properties. Can you please check whether this is not the case in your setup as well?
Regards,
Stefan
Progress Telerik
Hello,
Sorry for my delay, on the limiting max item I've set row and column number max to 3/2 and I've removed my "by-code" check...can you please provide me a sample where is taken is automatically stretched? I've tested on my side and I got no height/width assigned
Thanks
Attached to my reply you can find a sample application that demonstrates how the elements within RadLayoutControl automatically fill the available space. Clicking the Button would add an additional item and again, all items will fill the available space unless they have fixed values for the Width/Height properties. Can you please take a look at it?
I hope this helps.
Regards,
Stefan
Progress Telerik
Hello Stefan,
Sorry for my delay in response but I was on vacation and my wife forced me to stay away from PC! btw ypur example works really fine.. I was wondering if there's a way I can achieve this functionality :
I need to show the latest 6 views based on a series of fired event, if I've 6 opened event and another one arrives, I've to show the latest one arrived and remove the oldest one. It's possible to have some kind of stack or to minimize the oldest and show in the screen just the newest 6?
In case I am understanding your requirement correctly, you should be able to manipulate the Items collection of the control by adding/removing items so that it serves your needs. Does this correspond to your needs?
Regards,
Stefan
Progress Telerik