Hodaya Shalom
Hodaya Shalom

Reputation: 4417

Use resource with a parameter - WPF

I know that the use of regular resource is as follows:

Text="{x:Static prop:Resources.xxx}"

Is there a way to use resource with a parameter from a resource file in XAML?

Upvotes: 2

Views: 1865

Answers (1)

stukselbax
stukselbax

Reputation: 5935

You should use the StringFormat as:

Text="{Binding Path=YourParameter, StringFormat='{x:Static prop:Resources.xxx}'}" 

Upvotes: 2

Related Questions