This is a migrated thread and some comments may be shown as answers.

How to enable Resize on RadTileViewItem by users on the fly?

4 Answers 75 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Arfan
Top achievements
Rank 1
Arfan asked on 09 Jul 2015, 03:13 PM

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

Sort by
0
Arfan
Top achievements
Rank 1
answered on 13 Jul 2015, 12:45 PM
Any thoughts on this please?
0
Martin Ivanov
Telerik team
answered on 14 Jul 2015, 12:45 PM
Hello Arfan,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Arfan
Top achievements
Rank 1
answered on 14 Jul 2015, 02:01 PM

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

0
Martin Ivanov
Telerik team
answered on 16 Jul 2015, 11:21 AM
Hi Arfan,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TileView
Asked by
Arfan
Top achievements
Rank 1
Answers by
Arfan
Top achievements
Rank 1
Martin Ivanov
Telerik team
Arfan
Top achievements
Rank 1
Share this question
or