Syntax - How to combine Binding with Localization?

Viewed 37

I need to combine localization with binding. I have the following xml:

<Label Text="{Binding TravelOrder.StartDate, StringFormat='Start Date: {0:d}'}" />

I would like to have the string format localized, i.e. instead of "Start Date" to have, for instance, for French, "Date de debut".

How can I put something like {x:Static res:AppRes.StartDate} inside my StringFormat value ?

I have tried to write something like

Text="{Binding TravelOrder.StartDate, StringFormat='{x:Static res:AppRes.StartDate}: {0:d}'}" />

but clearly that doesn't work.

Thank you.

0 Answers
Related