Table of Contents

Namespace RentADeveloper.ResXLocalization.WPF

Classes

LocalizeArgs

Hosts the Arg0Arg8 attached properties that supply dynamic composite-format arguments to LocalizeExtension. Bind them on the element that carries the localized property, for example <TextBlock l:LocalizeArgs.Arg0="{Binding PeopleCount}" Text="{l:Localize {x:Static res:StringsKeys.PeopleInvited}}" /> with a resource value such as {0} people invited; the rendered text re-formats live whenever a bound argument or the culture of the ambient Current changes.

LocalizeEnumConverter

Multi-value converter that localizes an enumeration value bound as a real value (rather than as a DataContext). Use it in a MultiBinding whose first binding is the enumeration value and whose second binding is CurrentCulture, so the result re-converts on every culture change. The value is mapped to a resource key using the convention {KeyPrefix}{EnumTypeName}_{Value}.

LocalizeEnumExtension

XAML markup extension that localizes the enumeration value held in the target control's DataContext, re-resolving live on every culture change. Intended for item templates where each item is an enumeration value, for example <TextBlock Text="{l:LocalizeEnum}" />. The value is mapped to a resource key using the convention {KeyPrefix}{EnumTypeName}_{Value}.

LocalizeExtension

XAML markup extension that produces a binding to a localized string, re-resolving automatically whenever Current changes culture. Usage in XAML: {l:Localize {x:Static res:StringsKeys.Greeting}} for a typed key, {l:Localize SomeKey} for a key-only lookup across all registered resource managers, or {l:Localize Key=SomeKey, ResourceManager={x:Static res:Strings.ResourceManager}} to scope the lookup to one file. When the resource value is a composite format string, supply its arguments by binding the LocalizeArgs attached properties on the target element.