The MVVM pattern in WPF

In WPF we have the Model-View-ViewModel (MVVM) pattern. This pattern was created to allow you to separate concerns in a way that your business logic is going to be decoupled from your interface.

What happens in this pattern is that your View is going to be purely an user interface. Your ViewModel is going to contain the interface logic, it will be connected to your View through bindings and communicate through notifications. And your Model (for example a database model class) will be able to exchange data directly with your ViewModel.

From MSDN:


So it is basically separated this way:


  • Data




One thought on “The MVVM pattern in WPF

  1. Pingback: Closing a window in MVVM pattern | Coding Wise

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s