Specify a default empty DataTemplate instead of the default 'ToString()' DataTemplate

前端 未结 6 1349
囚心锁ツ
囚心锁ツ 2021-02-19 10:11

The default DataTemplate in a wpf application displays the result of the .ToString() method. I\'m developing an application where the default DataTemplate should di

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 11:13

    If you are using the MVVM pattern and have an abstract class which all your ViewModel classes derive from, you can use that class instead of System.Object:

    
        
        
    
    

提交回复
热议问题