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

Unable to store Reorder state of Tile View

2 Answers 69 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Deepak Agarwal
Top achievements
Rank 1
Deepak Agarwal asked on 29 Jul 2010, 04:47 PM

Hi

I used tile view control in application as I attached the image but I am unable to get the Reorder state of tile view.
 
Let me explain in brief suppose I started the application then application shows the tile order as you can see in the attached image. Now at the run time, I shifted the tile ( Header Name “Red”) down by dragging and the tile (Header Name “Yellow”) come up. now before Application Exit I want to store the reorder state of tiles. so when I'll reopen the application then I’ll get the same order what I changed last like (Header name “Yellow” and “Green”) Up and (Header Name “Blue” and “Red” ) Down.

But I am unable to store the Reorder state. After changing the order at run time, I tried to get through RadTileView.Items[0] as RadTileViewItem but it always returns the first tile which I put first at designed time.

Please help me.

2 Answers, 1 is accepted

Sort by
0
Kristhian
Top achievements
Rank 1
answered on 29 Jul 2010, 05:54 PM
I'm trying to sync two tileViews... i tried to set a single position by a simple assignment (tileviewItem.position = number;), but it cannot be done because the property si readonly... so I tried this..

foreach (RadTileViewItem item in preview.ParentTileView.Items)
                    {
                        item.SetValue(RadTileViewItem.PositionProperty, ((RadTileViewItem)mainTileView.ParentTileView.Items[cont]).Position);
                        cont++;
                    }
                    preview.ParentTileView.UpdateItemsSizeAndPosition();

It does not throw any exception, but it just don't do anything...

Any help is more than welcome...

Thanks.
0
Kristhian
Top achievements
Rank 1
answered on 29 Jul 2010, 06:08 PM
Hehe... I fixed my issue... so... i leave my solution....

foreach (RadTileViewItem item in preview.ParentTileView.Items)
                    {
                        item.SetValue(Grid.RowProperty, ((RadTileViewItem)mainTileView.ParentTileView.Items[cont]).GetValue(Grid.RowProperty));
                        item.SetValue(Grid.ColumnProperty, ((RadTileViewItem)mainTileView
.ParentTileView.Items[cont]).GetValue(Grid.ColumnProperty));
                        cont++;
                    }
                    preview.ParentTileView.UpdateItemsSizeAndPosition();


This thread was very helpful...

http://www.telerik.com/community/forums/silverlight/tileview/tileviewitem-position-changed-event.aspx


Regards..
Tags
TileView
Asked by
Deepak Agarwal
Top achievements
Rank 1
Answers by
Kristhian
Top achievements
Rank 1
Share this question
or