Reputation: 4117
At the moment I integrate the current strings like this:
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="lang/Dictionary.en-US.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
Is there a possibility to do this dynamically in my code behind files?
Upvotes: 0
Views: 1899
Reputation: 6501
Sure you can just do something like:
var res = new ResourceDictionary {Source = new Uri("somepath")};
this.Resources.MergedDictionaries.Add(res);
Note: This is off the top of my head on not tested but it should work
Upvotes: 1