Unable to store Reorder state of Tile View

3 posts, 0 answers
  1. Deepak Agarwal
    Deepak Agarwal avatar
    14 posts
    Member since:
    May 2010

    Posted 29 Jul 2010 Link to this post

    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. Kristhian
    Kristhian avatar
    4 posts
    Member since:
    Aug 2012

    Posted 29 Jul 2010 Link to this post

    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.
  3. DevCraft banner
  4. Kristhian
    Kristhian avatar
    4 posts
    Member since:
    Aug 2012

    Posted 29 Jul 2010 Link to this post

    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..
Back to Top