Dynamic XAML
Listening to: Phobos - Rhian Sheehan
Here are a couple of articles on programatically loading XAML:
-
Avalon
Skinning - Mitch Walker -
Yes
Sam, it is dynamic… - Chris Anderson
The secret sauce is:
Stream stream = File.OpenRead(styleName);
FrameworkElement resourceElement = (FrameworkElement)Parser.LoadXml(stream);
resourceElement.Resources.Seal();
this.Application.Resources = resourceElement.Resources;
stream.Close();


