Hey everyone,
I´m using a markupextension for loading internationalized strings in a WPF application like this:
<Button Content="{Translate MyText}"/>
My markupextension is named "TranslateExtension" and it searches a value for the key "MyText" from a database. It does this in the
ProvideValue(IServiceProvider serviceProvider)
method which returns the right string. Everything is working fine.
My problem is, that the ProvideValue-Method isn´t ever called again and there´s no way to pull a new string from the database when the language is changed. I now need a way to make the returned value "dynamic", to make the Button to reload it´s xaml and re-use the markupextension whether it´ll be through an event thrown when changing languages or whatever. How do i make the system call the ProvideValue-Method again? I tried the likes of InvalidateVisual() InvalidateArrange() InvalidateMeasure() UpdateLayout()...
I hope I made myself clear. Please feel free to ask for more information of you think you´re able to provide ideas or solutions. Thank you