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

RadTileView locked tiles do not rearrange when item is removed, causing unexpected behavior

3 Answers 67 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 06 Oct 2011, 07:21 PM
I have a RadTileView whose ItemsSource is an ObservableCollection of a class.

Say I populate the collection with 9 items and set the Colums to 3 and set the RowHeight to a set size (giving the scroll). This results in a 3x3 RadTileView. Now, starting in the upper right and reading by rows, the first five tiles are "unlocked" (OnPreviewPositionChanged sets e.Handled to false) and the last four are "locked" (e.Handled is set to true). When one of the items in the RadTileView ItemsSource collection is removed (MyCollection.Remove(MyClassObject), the unlocked tiles rearrange themselves but the locked ones will not. This leaves ugly gaps in the grid that do not behave well when maximizing and minimizing. The wrong tile will maximize when you try to maximize a tile below the gap.

Is this a known issue? Is there a work-around besides repopulating the collection completely? My tile views contain some slow-performing RadCharts and refreshing all of them when the user removes one tile is an unacceptable user experience. I also tried flagging the RadTileView before and after the item remove so that I could read the flag in OnPreviewPositionChanged, but I ran into very complex problems that I think may be thread safety issues, so I'm hoping someone can provide a more straight-forward solution.

Thanks.

- Thomas.

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Oct 2011, 01:41 PM
Hi Thomas,

 We prepared a project for you that demonstrates a possible solution for this scenario. The key thing is to avoid using the PreviewTilePositionChanged event handler immediately after the remove operation. Please check it out and let us know if it satisfies you.

Greetings,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Accepted
Petar Mladenov
Telerik team
answered on 11 Oct 2011, 03:05 PM
Hi Thomas,

 Since there are some changes in the RadTileView comparing the Official Q2 and SP versions, the suggested solution in the previous post works only for the SP. Now we prepared a project that both works with 0712 (Q2) and 0920 (SP) versions. Please check it out and let us know if it satisfies you.

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Thomas
Top achievements
Rank 1
answered on 11 Oct 2011, 10:54 PM
Thank you, Petar. This worked perfectly for me.
Tags
TileView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or