Use StringFormat to add a string to a WPF XAML binding

后端 未结 4 1230
一向
一向 2020-11-28 04:14

I have a WPF 4 application that contains a TextBlock which has a one-way binding to an integer value (in this case, a temperature in degrees Celsius). The XAML looks like t

4条回答
  •  星月不相逢
    2020-11-28 05:09

    Here's an alternative that works well for readability if you have the Binding in the middle of the string or multiple bindings:

    
      
      
        
    
    
    
    
      
      
      
      
      
    
    

提交回复
热议问题