I've just removed a big memory issue for me, I used to merge our "Themes" resource dictionary in every xaml file instead of just in the app.cs.xaml.
However, after removing the merging in every file except the App.cs.xaml I've lost the design time styles/templates.
Please note: This only applies to the styles merged into our Themes.xaml (e.g. Color.xaml, Brushes.xaml - we have one for each type of style). Stuff defined directly in Themes.xaml (which we have none of..) works.
I see two solutions,
1) Have the merging commented out in XAML and just un-comment it when I want to work with the designs.
2) Have this in the default ctor of every control: (perhaps only works in Blend)
#if DEBUG
Resources.MergedDictionaries.Add(
new ResourceDictionary()
{
Source = new System.Uri(@"RD.xml")
}
);
#endif
There has to be a better way to get design time editing of pages and controls, anyone know?
Thank you!