I have this simple piece of code and I am wondering how to convert it to German format (#.###,##) ?

// displays #.##
<Label Content="{Binding MySumValue}"/>
有帮助吗?

解决方案

Try set the ContentStringFormat for Label or just StringFormat for TextBlock with necessary xml:lang.

Example:

<Grid>
    <Button Name="MyButton" 
            Content="OK" 
            Width="100,999" 
            Height="25" />

    <Label Name="MyLabel"                
           Content="{Binding Path=Width, ElementName=MyButton}"
           xml:lang="de-DE"
           ContentStringFormat="{}{0:N2}" /> 
</Grid>

Output

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top