O'Reilly logo

Windows Phone 8 Application Development Essentials by Tomasz Szostak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Model

Model is a description of the domain model that contains all characteristics that may describe some objects. In short, model represents the data. The main goal of creating models is to encapsulate data, validation, and business rules within classes. It is independent from ViewModel, View and is not designed to store any visual information, but it can be a data entity; for example, taken from database or web service resources.

Model classes use the INotifyPropertyChanged interface in notifications about changing a property value. All we need to do is to implement the INotifyPropertyChanged interface in our Model class and raise an event each time the property is set.

public class SampleModel : INotifyPropertyChanged { private string sampleProperty; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required