Class Translate
A XAML markup extension that binds a property to the text of a translation unit and updates the property when the culture of the unit's translation manager changes or when NotifyPlaceholdersUpdated() is called.
Usage: Text="{tlumach:Translate {x:Static translations:Strings.Hello}}".
public sealed class Translate : MarkupExtension
- Inheritance
-
MarkupExtensionTranslate
- Inherited Members
Constructors
Translate(TranslationUnit)
Initializes a new instance of the Translate class.
public Translate(TranslationUnit translationUnit)
Parameters
translationUnitTranslationUnitThe translation unit whose text the target property receives.
Exceptions
- ArgumentNullException
translationUnitis null.
Methods
ProvideValue(IServiceProvider)
Returns a binding to the Value observable of the translation unit.
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe service provider of the XAML parser. It is not used.
Returns
- object
The binding to apply to the target property.