I am trying to add a xaml resource file dynamically using the statement,
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Sou
At last, it worked. Here is what I did,
Changed the Uri pattern to
var foo = new Uri("pack://siteoforigin:,,,/resources/leaf_styles.xaml", UriKind.RelativeOrAbsolute);
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = foo });