![](/img/trans.png)
[英]How do I format a double value in XAML to German format on a DataGridTextColumn?
[英]How do I format a double value in XAML to German format?
我有這段簡單的代碼,我想知道如何將其轉換為德語格式(#。###,##)嗎?
// displays #.##
<Label Content="{Binding MySumValue}"/>
嘗試使用必要的xml:lang
將ContentStringFormat
設置為Label
或僅將StringFormat設置為TextBlock
。
例:
<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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.