Hi,
Here's my problem:
I have a ViewModel which should be displayed in two locations at the same time, using two differents views (a mainView and a ToolBarView).
So I had 3 files:
Yesterday, I needed to support a new ViewModel naming: MyViewModel => MyDocument, but MyViewModel should still be supported.
So I added a rule in the BootStrapper.Configure():
The arborescence is:
Can someone helps me ? Maybe the way I added the rule was bad, I'm still on it at the moment.
You can easily reproduce the problem, but I can upload a sample project somewhere if you need.
Thanks,
Ph
Here's my problem:
I have a ViewModel which should be displayed in two locations at the same time, using two differents views (a mainView and a ToolBarView).
So I had 3 files:
- SomeWorkspace.MyViewModel
- SomeWorkspace.MyView
-
SomeWorkspace.My.ToolBarView
<ContentControl cal:View.Model="{Binding MyViewModel" cal:View.Context="ToolBarView"/>
Everything worked fine, ToolBarView and MyView were displayed correctly.Yesterday, I needed to support a new ViewModel naming: MyViewModel => MyDocument, but MyViewModel should still be supported.
So I added a rule in the BootStrapper.Configure():
ViewLocator.NameTransformer.AddRule("Document$", "View");
Now the ToolBar isn't displayed anymore (but MyView is).The arborescence is:
- SomeWorkspace.MyDocument
- SomeWorkspace.MyView
-
SomeWorkspace.My.ToolBarView
Can someone helps me ? Maybe the way I added the rule was bad, I'm still on it at the moment.
You can easily reproduce the problem, but I can upload a sample project somewhere if you need.
Thanks,
Ph