How to create new object with master-detail scenario?

266 Views Asked by At

I use master-detail scenario to show and update data of selected object.

So this scenario allows me to implement read, update and delete operations.

But how to implement create operation?

I used a data template inside of ContentControl. But the controls in this data template is inaccessable from the main window class. So I can't read its values to fill new object's data.

Do I have to create a new window with the same controls structure as inside the data template and to use it for create operations? Or something else?

1

There are 1 best solutions below

0
On

Heh, I just decided to create new empty object, then to add it to object list, and then to allow the user to edit this new object at once. Nice solution, eh? :)

But is there a better solution?

In addition:

Do I have to create a new window with the same controls structure as inside the data template and to use it for create operations?

In Win Froms I used this approach to add new object to my collection or database.