1. 在WPF中Label的Content有时内容只需要改变个别数字,而不需要所以内容都修改,这时候就要使用StringFormat,

    如: <Label Content="I have xxx friends"/> 这里面的xxx是个变量,那在Binding时应该怎样写呢

1   <Label Content="{Binding FirendNumber, StringFormat='I have {0} firends}"/>
2                                  
View Code

相关文章:

  • 2021-07-23
  • 2021-12-23
  • 2021-09-20
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
猜你喜欢
  • 2021-05-29
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案