Please suggest me the ( Interaction model of view model) MVVM design in the simple scenario discusse

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-03-14T07:52:58Z Indexed on 2010/03/14 7:55 UTC
Read the original article Hit count: 548

Filed under:
|
|
|

Data Layer

I have an Order class as an entity. This Order entity is my model object.

Order can be different types, let it be

  • A

  • B

  • C

  • D

Also Order class may have common properties like Name, Time of creation, etc.

Also based on the order type there are different fields that are not common.

View Layer

The view contains the following

  1. Main Menu
  2. ListView

The Main Menu contains the drop down menu button which is used to create the order based on the type selected from the drop down. The drop down contains the Order types ( A ,B , C and D).

There are different user control based on the order type. Like for example if user chooses to create an order of type A then different view with different inputs field is popped up.

Hence, there are four user control for each order type.

If user selects A option from the drop down then Order of type A is created and vica versa.

Now below is the List View that contains the List of orders so far created by the user.

To Edit any particular order user may double click the list view row. Based on the order type clicked by the user in the listview, the view of that order type opens in edit mode. For example if user selects an order type A from the list view then view for order type A open in edit mode.

Please suggest me interaction model for view model's in the scenario discussed above.

Please excume me if the query is very basic, since I am new new to MVVM and WPF ,

© Stack Overflow or respective owner

Related posts about mvvm

Related posts about mvvm-foundation