ValidationRules without binding

前端 未结 3 517
野的像风
野的像风 2021-02-12 19:31

I want to use the ValidationRules (and it\'s UI effects) on the textbox without actually binding anything to the textbox.

I want to use the textbox for some input t

3条回答
  •  一向
    一向 (楼主)
    2021-02-12 20:16

    You could bind to just any string, e.g. create one as the source for the binding:

    xmlns:sys="clr-namespace:System;assembly=mscorlib.dll"
    
      
        
          
            
              Default Text
            
            
              
            
          
        
      
    

提交回复
热议问题