Replace specific view/viewmodel in region with multiple views

Topics: Prism v4 - WPF 4
Jan 30, 2014 at 7:41 AM

I'm using Telerik's TileView component which is using Prism:RegionManager. I'm adding new Tiles to this TileView using RegionManager.AddToRegion() method and it is working fine (I think RequestNavigate would do the trick also).

Now I would like to dynamically change the specific view/viewmodel which has been already added to this TileView's region.

Is this possible?

I would need to somehow get specific view in the region and replace it with new one but what is the correct way to do it? Removing the item and adding a new one does not sound very good because new item is added to the end of item list so position changes...


Jan 31, 2014 at 1:50 PM
Hi Kalle,

If I understood correctly, you would like to replace and rearrange Views/ ViewModels into a Region. Therefore, you may find useful the following CodePlex thread which resolves a similar issue from the one you are facing:

Notice that Regions have a SortComparison property and you would be able to sort the views each time the Region.Views collection changes.

I hope this helped you,

Gabriel Ostrowsky