I do have a ListDetailsView
showing some data (lets say Company
as a simple example here). Normally the details of a Company
are shown as readonly. However, via the ListDetailsView.DetailsCommandBar
it is possible to edit a Company
(and also add a new Company
). A clear separation between view and edit mode seems to be a good choice for the UI. I'm using a UserControl
to show details of a Company
.
So here are my questions:
- Where should the differentiation between view- and edit-mode happen? I thought it is a good idea to have a
CompanyDetailsControl
and aCompanyDetailsEditControl
and select between the two (both using the sameCompanyDetailsViewModel
). There are other solutions as well, for example, theCompanyDetailsControl
could handle the edit- and view-mode internally. - Assuming that it is a good idea to switch between two
UserControl
, how can that be realized with theListDetailsView.DetailsTemplate
? I though it would be easy to use aDataTemplateSelector
here, but that is only available for theItemTemplate
.
Not sure what code to provide to clarify my questions. So in case you need any code to better understand my question please leave a comment.