Skip to content
New issue

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

Attached property for translation #27

Open
JohanLarsson opened this issue Nov 15, 2017 · 1 comment
Open

Attached property for translation #27

JohanLarsson opened this issue Nov 15, 2017 · 1 comment

Comments

@JohanLarsson
Copy link
Member

JohanLarsson commented Nov 15, 2017

<TextBlock>
    <Run Text="{l:Static p:Resources.Status}" />
    <Run Text=": " />
    <Run Foreground="{Binding Status,
                              Converter={x:Static converters:StatusToBrushConverter.Default}}"
         Tag="{Binding Status,
                       Converter={x:Static converters:StatusToTranslationConverter.Default}}"
         Text="{Binding RelativeSource={RelativeSource Self},
                        Path=Tag.Translated,
                        Mode=OneWay}" />
</TextBlock>

To stay typed instead of using Tag. Question is what to name it?

@JohanLarsson
Copy link
Member Author

JohanLarsson commented Nov 16, 2017

Maybe something like: {l:Translate Binding={Binding Status}}

  • optional parameter ResourceManager
  • handle binding with converter that returns a translation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant