RequestNavigate method is unable to find correct view in the following case:
CustomView view = new CustomView();
string viewId = "MyDynamicId";
- Next, I try to use RequestNavigate like this:
object view = RegionManager.Regions[regionName].GetView("MyDynamicId");
//Preceeding code works and give me correct view...
//But this code seems to not retrieve existing view because he try to create a new view
//although I use KeepAlive = true for the view
Precisions : I use Unity
Thanks a lot for your help, and tell me if I forgot some details to understand my problem.
In my understanding, I think you will initialize the views using the Container.
You can't use CustomView view = new CustomView() yourself.
Please use container.RegisterType<object, CustomView>("CustomView"); in your module initializer.
or CustomView view = container.Resolve<CustomView>();
Hope this helps.