I’ve been discussing an architectural question with a colleague this week. The scenario includes a WPF application, Domain Driven Design and MVVM. The goal is a relatively “pure” domain model where the classes in the model do not depend on any UI specific or other external assemblies. They are pretty much pure “POCO” objects. The question is whether it’s... Continue Reading →
Skinning WPF – Call InitializeComponent in App.Xaml
For the past two days, I’ve been trying to get the infrastructure in place for skinning a WPF application. My goal is to support multiple skins and swap them out dynamically while the app is open. I could get the skin to affect the UI if I set it in the main window’s resource dictionary.... Continue Reading →
MVVM: To Wrap or Not to Wrap? BLINQ and CLINQ to the Rescue! (Part 3)
In part 1, I asked the question “Do I expose the model directly, or do I wrap each item in its own view model?” We looked at two plausible options for handling this and saw some code examples of each. In part 2, I asked the question “Do I expose the model’s collections directly, or... Continue Reading →
MVVM: To Wrap or Not to Wrap? Should ViewModels wrap collections too? (Part 2)
In my previous post, I asked the question “Do I expose the model directly, or do I wrap each item in its own view model?” We looked at two plausible options for handling this and saw some code examples of each. Now it’s time for a more interesting and challenging scenario: Do I expose the... Continue Reading →
MVVM: To Wrap or Not to Wrap? How much should the ViewModel wrap the Model? (Part 1)
The WPF community seems pretty happy with the MVVM pattern for WPF development. I can see why. It’s a great fit for WPF and its strong data-binding support. It provides a very nice layer for managing UI state, translating, formatting, and aggregating data. So let’s say that I adopt MVVM for my project. I think... Continue Reading →