I have a WPF application. I have some labels and some datagrids which are bound to some public properties. Some of these properties are numerical values.
In the datagrid
For label you need to use ContentStringFormat:
Reason:
Label's Content property is of type object and StringFormat is used only when binding property is of type String.
Content
object
StringFormat
String
If you try your code with TextBlock's Text property it will work fine with StringFormat because Text property is of type string.
Text