Currently I have created an instance of the Light theme, added a custom resource named "Hello" and then I change the value of this key on a resize event (just an easy place to put some binding) however when I resize the window the dictionary itself gets updated yet the corresponding string on the screen never get updated.
ResourceDictionary.DefaultDictionary = Light.GetThemeDictionary();
SpriteFont font = Content.Load<SpriteFont>("Segoe_UI_15_Bold");
FontManager.DefaultFont = Engine.Instance.Renderer.CreateFont(font);
MainWindow = new MainWindow();
viewModel = new MainWindowViewModel(MainWindow);
MainWindow.DataContext = viewModel;
graphCanvas = VisualTreeHelper.Instance.FindElementByName(MainWindow, "GraphCanvas") as Canvas;
graphCanvas.SizeChanged += (sender, args) =>
MainWindow.Resources["Hello"] = "Resize Event";
// Do I need to push the change here?
Is it possible to change the resource dictionary during run-time? This would allow dynamic styling and resources. Also is dictionaries the best method for localization or is there a better alternative? If so why don't dynamic resources get updated during run-time but instead behave like static resources?
Thank you for the help,