WPF A good way to make a view/edit control?

前端 未结 4 2221
挽巷
挽巷 2021-02-10 04:18

this is just a question to discuss - what is the best way to make a view/edit control in WPF? E.g. we have an entity object Person, that has some props (name, surname, address,

4条回答
  •  轮回少年
    2021-02-10 04:41

    I would create a single View with 2 different configoptions , f.e. 2 different constructors to make the the relevant field editable/readonly or visible/hidden

    This way you don't write redundant XAML and you can configurate all fields over code behind or ViewModel when using MVVM

提交回复
热议问题