Let's suppose, that we've got the following dictionary:
<ResourceDictionary xmlns:sys="clr-namespace:System;assembly=mscorlib"> <sys:String x:Key="Test">Ala ma kota</sys:String> </ResourceDictionary> This dictionary is merged somewhere in custom control:
<UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="MyDictionary.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> How can I completely change value of the resource "Test" during application runtime from the code behind?