WPF Error Styles only being rendered properly on visible tab of a tab control

前端 未结 3 661
南方客
南方客 2020-12-23 22:54

I have a data object used to contain my UI data that supports INotifyPropertyChanged and IDataErrorInfo. Originally I had all of the UI controls di

3条回答
  •  [愿得一人]
    2020-12-23 23:41

    Just to add to the answer provided, the error template can be set once in a resource dictionary. Just the triggers have to be copied & pasted for all the default styles of all the relevant element types.

    For example:

    
        
        
    
        
    
    

    Or, take it one step further and avoid the trigger repetition by combining the styles: