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

Resize Tiles Using Drag

2 Answers 95 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Veteran
Anthony asked on 31 Jul 2014, 07:31 AM
Hi,

I have used the following blog to get some varying sized tiles which is great but I would like my users to be able to adjust tile sizes themselves.

http://blogs.telerik.com/xamlteam/posts/11-06-25/new-tileview-features.aspx

Is there any way that you can resize a tile by dragging on its bottom right corner?

I can do it by putting a button on the tile and in the button press adjust the RestoredWidth and RestoredHeight of the tile but this is not a great UI experience.

Thanks
Anthony

2 Answers, 1 is accepted

Sort by
0
Huy
Top achievements
Rank 1
answered on 31 Jul 2014, 08:54 PM
I'm also interested in this problem

Some sample code would be appreciated

Thanks
0
Anthony
Top achievements
Rank 1
Veteran
answered on 04 Aug 2014, 12:10 AM
Hi,

I figured this one out myself.

I added a Thumb to the tile:

<Thumb VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="10" Height="10" DragDelta="Thumb_DragDelta"/>

And handled the drag delta in code behind to set the height and width of the tile in my view model:

            (DataContext as DashboardItemViewModel).RestoredHeight += e.VerticalChange;
            (DataContext as DashboardItemViewModel).RestoredWidth += e.HorizontalChange;

Thanks
Anthony
Tags
TileView
Asked by
Anthony
Top achievements
Rank 1
Veteran
Answers by
Huy
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Veteran
Share this question
or