samedi 9 mai 2015

WPF Change culture dynamically

I know, it's very popular question and I should use google, but I can't find any solution which give satisfaction to me.

I would like to have a button, which change language in my program dynamically, so I can't close my app and run again. I'm searching for a solution in WPF.

Could you give me any tips how I can reload all strings which was taken from *.resx?

I need as simple solution as possible.

Maybe I can use dynamic resource?

I tried

<Button Content="{Binding Source={x:Static p:Resources.WIDTH}}" />

and

<Button Content="{DynamicResource {x:Static p:Resources.STRING_NAME}}" />

but second 'could not be resolved' and first doesn't work.

Aucun commentaire:

Enregistrer un commentaire