Skip to content

Commit

Permalink
Add content to Model.aml
Browse files Browse the repository at this point in the history
References #11
  • Loading branch information
andreashuber-lawo committed Oct 27, 2015
1 parent d5a6034 commit 0048ad2
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,30 @@
public string ListeningPort { get { ... } set { ... } }

public string LogFolder { get { ... } set { ... } }

public bool AutoScrollToMostRecentEvent { get { ... } set { ... } }
}
</code>
<para>
The <application>Model</application> is not particularly interesting, because its only purpose is to handle
settings persistence. Note that this is
<link xlink:href="fa86e52c-0fb0-4acb-9b55-fb689eb5f17c#ModelViewModelSeparation">not a particularly typical or
even exemplary MVVM Model</link>.
settings persistence. Note that this is not a particularly typical or even exemplary
<application>Model</application>, see the note at the bottom of the
<link xlink:href="fa86e52c-0fb0-4acb-9b55-fb689eb5f17c">introduction for this tutorial</link>.
</para>
</introduction>
<section address="ChangeNotification">
<title>Change Notification</title>
<content>
<para>

Often the <application>ViewModel</application> duplicates at least some information provided by the
<application>Model</application>, which is why the <application>ViewModel</application> needs to be notified
when the data in the <application>Model</application> changes.
<codeEntityReference>T:System.Configuration.ApplicationSettingsBase</codeEntityReference> already implements
<codeEntityReference>T:System.ComponentModel.INotifyPropertyChanged</codeEntityReference>, so the code
generated by the application settings designer works just fine for us. A more typical
<application>Model</application> would simply derive from
<codeEntityReference>T:Lawo.ComponentModel.NotifyPropertyChanged</codeEntityReference> and implement very
similar change notification as a <application>ViewModel</application>.
</para>
</content>
</section>
Expand Down

0 comments on commit 0048ad2

Please sign in to comment.