I met this problem today , by using binding ; I could binding a number of values in a xaml file , the value looks like 58000.1234 , 58000.2234 , 58431.100
etc. I want to add a word in the middle of this value , which it could turn out to be 58x000.1 ,58x000.2, 58x431.1
I found StringFormat
could be a good method for dealing my problem , so I somehow tried this following code ,
<TextBlock Text="{Binding Distance, RelativeSource={RelativeSource TemplatedParent}, StringFormat='{}{0:0.#}'}" />
it manage the point value problem , but i still don't know how to add the x in the middle of my values .
StringFormat='distance {0:0.#} m'
This code can add words before and after value .