localization - WPF, localisation: reevaluating control values -
i'm doing small research on localisation methods in wpf. heard idea markup extension:
<label content="{local:translate {-- label id here --}}" />
i solution much: it's extremely easy implement , seems nicely flexible. i've got 1 concern, however. let's suppose, user changes locale in runtime. how ensure, localized properties reevaluated match new language?
you need call dependencyobject.invalidateproperty. keep in mind if binding object implementing inotifypropertychanged
reevaluate way of underlying data changing.
dependencyobject.invalidateproperty
can called on given dependencyproperty
such label.content
.
label label = new label(); label.invalidateproperty(contentproperty);
this have done varying properties need re-evaluation. there in depth article on msdn around localization within wpf varying alternatives should investigated.
Comments
Post a Comment