Built-in WPF IValueConverters

后端 未结 2 1708
轻奢々
轻奢々 2020-12-12 09:21

Ok, it was a nice surprise (after writing it several times) to find that there already is a BooleanToVisibilityConverter in System.Windows.Controls

2条回答
  •  既然无缘
    2020-12-12 09:58

    Before 3.5 SP1, an IValueConverter was required for string formatting. Now, you can use the StringFormat property on Binding to do this.

    From the MSDN page:

    
      
        
          
            
            
          
        
      
    
    

提交回复
热议问题