Plugins in WPF MvvM with MEF

In this post I will show you the way we can implement a plugin functionality in WPF MvvM application with use of Managed Extensibility Framework (MEF). MEF is a tool that may facilitates extending and decoupling your application. In some scenarios it is very similar to Dependency Injection, but is rather focused on one primary purpose: Import and Export of objects. What is good…

By Mirek on (tags: MEF, mvvm, Plugins, WPF, categories: architecture, code)

Cross-property validation in WPF MvvM

In a previous post I have described hot to utilize a INotifyDataErrorInfo interface. Today I will show you my solution for automated cross-property validation integrated with the ModelValidation base class from previous post. First I add a custom CrossValidationAttribute and later on a virtual method which will be called from above CrossValidationAttribute for each property mar…

By Mirek on (tags: CustomValidationAttribute, mvvm, validation, WPF, categories: code)

Utilizing INotifyDataErrorInfo in WPF MvvM app

Today I will show you how I utilize the INotifyDataErrorInfo interface to accomplish validation mechanisms in WPF application.   A time ago I have described how to validate model in WPF application with use of IDataErrorInfo interface. Now in WPF 4.5 we have another possibility which is the INotifyDataErrorInfo interface. The MSDN documentation is here a little scarce, but…

By Mirek on (tags: INotifyDataErrorInfo, mvvm, validation, WPF, categories: code)