c# - Add editing to MVVM in a hierarchical data structure -


This question is a follow-up to one, and it is more about confirmation than the open question.

The example of my visual model is a personal example of the model, _modelInst .
During modeling, there is a unique use of visual modal on model data (hence the model does not need to implement INOTifyPropertyChanged.) <

< / P>

/ strong>
Example Simple Price Field
Back _modelInst.fieldname;
_modelInst.fieldname = value;
It is easy to implement ...

  • Create and manage a view model example on parental data structure
    Example for more complex object types like Streets :

    • Creating a new view model for that type.
      Music knows her parents and her field name.
    • Display in a ContentControl + DataTemplate
    • Receive / Setting: Through Parental Methods with Field Name as Parameters

      Overwrite Entire Original Object Only a field is changed while doing

    This means that a new interface implemented by parents for each of these structures ( _modelInst With update routines working on).

  • Create a ViewModel instance with no direct knowledge of parental data structure
    Example

  • < Li>

    sending update instructions for parents

  • Message
  • reflection (the guardian knows that Which child is called the Festival by comparing it with the example of all the stored children in the ceremony)
  • All of these are implementing a big mess, which are the areas of the model Fan for Make Shn who is editing.
    There are lots of models that mean all areas ..

    (4.) Anyone can create a normal void that works through a single reflection, where each sub-object is used by your parents and Knows its area name (+ index, if in a list).
    The argument of the root will only interfere with the model.
    But that solution will also require an instrument to store the path of a field within _modelInst . .

    Is there any other (more simple) way to achieve this? Did I misunderstood the principles of MVVM? (again)?
    Is MVVM suitable for the manipulation of large hierarchical data structures?

    Hope this resource will help; They helped me a lot, as I have learned about how to represent the object graph / hierarchy with the MVVM and the visual model:


  • Comments

    Popular posts from this blog

    c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

    Calling GetGUIThreadInfo from Outlook VBA -

    Obfuscating Python code? -