I have a ViewModel that I want to display. I use the command:
var CollectionView = CollectionViewSource.GetDefaultView (MyViewModel);
if (CollectionView! = null)
collectionView.MoveCurrentTo (MyViewModel);
The problem is that it create two instance of the view with the same instance of the ViewModel.
Someone has an idea of my problem?
Thanks
Your code doesn't really make sense... the parameter of
CollectionViewSource.GetDefaultView
is supposed to be some kind of collection, but you're passing a ViewModel. You should pass the collection that contains the ViewModel.