Hi,
How can we enable resizing on the RadTileViewItem? I need to allow users to resize the RadTileViewItem just like the RadWindow control's resizing functionality as described here:
http://docs.telerik.com/devtools/silverlight/controls/radwindow/features/resizing
How can we achieve similar functionality in RadTileViewItem? It will be great if you can produce a sample demonstrating the resizing of RadViewItem by users on the fly.
Thanks,
Arfan Baig
4 Answers, 1 is accepted
The RadTileView control doesn't support resizing of its items out of the box. In order to achieve such effect you can write custom code. For example, you can create a custom tileview item that derives from RadTileViewItem and implement the resizing logic in the new element's class. I spent some time to prepare an example that demonstrates such implementation, however, keep in mind it is not finished - currently it supports only resizing with the left and right borders of the item. Also, this approach is not well tested and it won't work as expected in some cases. This is why I recommend you to use it only as a base for your implementation.
Please give the project a try and let me know if it helps.
Regards,
Martin
Telerik
Hi Martin,
Thank you for providing the sample, it looks amazing!
I just have couple of observations. Its not allowing me to re-size vertically (as you already mentioned), is it a lot of work to do to achieve vertical re-sizing? Also, the items vanish if I keep on reducing the size. And the maximized item is not re-sizable. Can you please revise the sample?
Thank you!
Regards,
Arfan Baig
The vertical resizing behavior should not be hard for implementing. Basically, you can set the top margin of the "MainGrid" in order to resize the item from its top border and the RestoredHeight for the bottom border. However, keep in mind that the resizing functionality itself is not very straightforward task and its implementation will require some of your time.
About the vanishing item. This happens because there is no check if the item's size and margin are 0 or lower. In order to resolve this you will need to check for this condition when the resize is in progress.
if
(the
new
size of the item makes him vanish (
is
0 or lower))
{
// do nothing
}
else
{
// resize
}
I hope this helps.
Regards,
Martin
Telerik