How to assign a datatemplate to textbox wpf

后端 未结 1 1559
逝去的感伤
逝去的感伤 2021-01-19 07:27

TextBox is supposed to show masked dollar amount for certain access privileges. I created a converter class(inheriting from IValueConverter) to handle masking by implementi

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-19 08:17

    You can use a ContentControl to display your DataTemplate. Another idea, which I prefer in this case, is to use styles. Below code shows hot to do both.

    
    
        
    
            
    
            
                
            
    
            
    
        
        
    
            
    
            
    
        
    
    
    

    0 讨论(0)
提交回复
热议问题