Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Global shared data for all instances of a type of control? #69

Unanswered
Chlorie asked this question in Q&A
Discussion options

I want to create something like a text localization system. Say I have a Dictionary<string, Dictionary<string, string>> mapping from language codes to translation tables containing key-value pairs, and a global setting of the currently active language. There'll be custom controls like a LocalizedLabel that exposes a Key property to update its Text accordingly.

Is there a clean way to specify bindings to a global resource (like an application-scope StaticResource), or do I have to inject the same thing into all such viewmodels, or even resort to a singleton?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /