Conditional DataTemplate

前端 未结 1 723
没有蜡笔的小新
没有蜡笔的小新 2020-12-13 13:15

Here is what I am trying to do. I have 2 Data Templates defined which both refer to a different user control.


    

        
1条回答
  •  猫巷女王i
    2020-12-13 14:07

    Don't set the ItemTemplate but use an ItemTemplateSelector.

    DataTriggers would be fine too of course, spares you the extra class for the selector. e.g.

    
        
            
                
                    
                
            
        
    
    

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