We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to use Gettext in StringFormat of a Binding like this:
<TextBlock Text="{Binding Name, StringFormat={wpf:Gettext Name: {0}}}">
The text was updated successfully, but these errors were encountered:
Unfortunately that's a limitation of wpf's xaml. You can look at writing a multibinding wrapper to allow binding to occur (see https://www.codeproject.com/Articles/456589/Bindable-Converter-Parameter for an example)
Sorry, something went wrong.
@D-Bullock is absolutely right. But this is a frustrating limitation of XAML.
However, while we cannot change the BindingExtension of WPF to support this, we might be able to do this the other way around.
It might be possible to do something like
<TextBlock Text="{wpf:Gettext Name: {0}, Param0={Binding Name}}"/>
or
<TextBlock Text="{wpf:Gettext Name: {0}, Param0Path=Name}"/>
Both the XGetText.Xaml.ps1 and GettextExtension would need to be updated. And as always, pull-requests are welcome :)
This will be done with the GettextStringFormatConverter XAML extension, which is applied to the Converter property of the Binding.
robert-j-engdahl
No branches or pull requests
I would like to use Gettext in StringFormat of a Binding like this:
<TextBlock Text="{Binding Name, StringFormat={wpf:Gettext Name: {0}}}">
The text was updated successfully, but these errors were encountered: