How do you put your watch time model in a separate assembly?

I am using MVVM Light and Prism with a view model locator pattern. I really like to have a design viewing time model for use in Blend, but I don't necessarily want to send it with my production code. Is there a way to place the design view time model in another assembly and then tell the view model locator to find it there? It seems that building the development time (* .Design.dll) will help solve this problem, but I cannot decide how to do it.

+4
source share
1 answer

Mike,
Add the following to your XAML.

xmlns:designTime="clr-namespace:MyDesignTimeNS;assembly=MyBinaryName" d:DataContext="{d:DesignInstance designTime:DesignTimeObjectNameViewModel, IsDesignTimeCreatable=True} 

With this, I can save development time data in a separate binary file and not distribute it.

+4
source

All Articles