WPF stringformat设置

  <TextBox Text="{Binding Path=Model.Bnparea, StringFormat={}{0:.#}}"  />

  <Label ContentStringFormat="{Binding Path=Model.Bnparea, StringFormat={}{0:.#}}" ></Label>

原文地址:https://www.cnblogs.com/zhuxiaohui/p/2832419.html