Static text resource with custom fields

13 Views Asked by At

I want my text from resource dictionary to contain provided from my view model data

I`m making a WPF application with localizations and want to add some text from my resource dictionary as a StaticResource:

`<system:String x:Key="MarketInfo">You can buy it for {0} USD at {1}</system:String>`

As you can see, I also want to provide data from my ViewModel:

`public MarketInfo MarketInfoFirst { get; set; }`

This property contains two required fields: Price and Name.

I usually wrote something like this for simple fields:

`<TextBlock Text="{StaticResource MarketInfo}"/>`

But how can I add my data?

0

There are 0 best solutions below