ControlTemplate with DataTrigger Vs. DataTemplate with DataTemplateSelector

后端 未结 4 1250
孤城傲影
孤城傲影 2020-12-08 23:10

I have a generic control which displays an editor based on the type property inside a ViewModel. Currently it\'s implemented using Control, ControlTemplat

4条回答
  •  隐瞒了意图╮
    2020-12-08 23:48

    I would suggest the answer is more one of do you think a control is necessary. You get a whole bunch of functionality with a control that is not really available with a DataTemplate. You can add DependencyProperties, events, functions etc etc. But do you need this? If you don't then a control might be overkill.

提交回复
热议问题