【发布时间】:2022-01-22 17:05:06
【问题描述】:
我有:
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Price, StringFormat='{0:F0} $'}" XAlign="Center" YAlign="Center" TextColor="#2bff00" FontAttributes="Bold" FontSize="Small" HorizontalOptions="CenterAndExpand"/>
但是我的对象属性是:
JsonProperty("price_usd")]
public decimal? Price { get; set; }
所以真正的价值是:"price_usd":"3824.56" 和我的标签显示 3824 没有逗号?
【问题讨论】:
-
我想改这个:StringFormat='{0:F0} 得到一个逗号?如果它是可能的。我不想编辑 c# 代码。