Using theme without CODE Framework

Jan 6, 2014 at 6:24 AM
Hi, I'm a newby to the CODE framework. I really like the various themes provides. Is it possible to use only the various themes by including CODE.Framework.Wpf.Theme..dll in my project without having to rely on CODE framework MVVM or any of its other parts. What I like to do is to create a sample WFP app with 1 window and change its theme by just including one of the CODE.Framework.Wpf.Theme..dll.
thank you for any comment.
Developer
Jan 6, 2014 at 2:04 PM
Edited Jan 6, 2014 at 2:07 PM
The themes are comprised of two different parts, 1) Color scheme, and 2) Layout. It is possible to use the color resources without any other parts, but I don't think that will get you vary far (it's not difficult to create color resource dictionaries). The real value of the theme is the layout, this part is integral to the CODE Framework and relies heavily on the concept of a "shell" container. This shell is the container for all other views loaded by the framework. I'm not 100% sure, but I think it is possible to load a CODE Framework layout view outside of the shell, but I'm not sure how much that would give you as no menu would be available.

Keep in mind that once you have a CODE Framework project you don't have to use any of the built in layout views, you can create a new view where you perform standard WPF layout. With this in mind to accomplish your goal you would simply create a new CODE Framework WPF project, then tweak the start up process to load your form automatically. To do so just modify the App.xaml.cs file's ApplicationStartup method to something like this:
private void ApplicationStartup(object sender, StartupEventArgs e)
{
    Controller.Action("Home", "Start");
    //Controller.Action("User", "Login");
    //StartViewModel.Current.LoadActions(); <-- this will prevent the main "menu" from showing
    Controller.Action("YourController", "YourViewName");

 }
Jan 7, 2014 at 8:47 PM
Thank you. Your comment was very helpful>