The PDFx is a lightweight open source .NET library that allows developers to describe dependencies between Properties in declarative C# code. Once relationships are registered, the framework monitors property changes and ensures that the INotifyPropertyChanged.PropertyChanged event is fired for all directly and indirectly dependent properties in a very efficient way. The library is available for WPF, Silverlight, WinRT (Windows Store) and Windows Phone.
I’ve developed the PDFx as an InterKnowlogy RECESS project and published the source code and examples on codeplex.
In a series of blog posts I am going to cover the library’s most important features:
- Part I: Introduction
- Part II: Library Versions
- Part III: Getting Started
- Part IV: Using PDFx with an existing 3rd party framework
- Part V: Simple Property Dependencies
- Part VI: External Property Dependencies
- Part VII: Dynamic External Property Dependencies
- Part VIII: Collection Dependencies
- Part IX: Dynamic Collection Dependencies
- Part X: Caching
- Part XI: Smart Property Changed Notification
- Part XII: Callbacks
- Part XIII: Sanity Checks
- Part XIV: Data Delegation
- Part XV: Two Way Converters
- Part XVI: One Way Converters
Using PDFx in your Project
Adding a reference to the PDFx
Before using the PDFx, you have to decide whether you would like to go with the platform independent Portable Class Library or one of the feature richer platform specific libraries. Please check out Library Versions to learn more about the different versions.
If you decide to go forward with the Portable Class library, all you need to do is add a project reference to PropertyDependencyFramework.dll.
If you decide to go forward with a platform specific library (recommended), you need to add a project reference to PropertyDependencyFramework.dll and a platform specific binary.
|Platform||.NET 4.5 Portable Class Library|
|bin\Release\WPF\PropertyDependencyFramework.dll & bin\Release\WPF\PropertyDependencyFramework_WPF.dll||bin\Release\SL5\PropertyDependencyFramework.dll &
Deriving from Bindable
The PDFx’s features are all exposed through protected methods which live in the PCL’s Bindable-class as well as in the platform specific BindableExt-classes.
Every class, in which you would like to use the PDF’x functionality consequently needs to eventually derive from Bindable or BindableExt which both live in the PropertyDependencyFramework-Namespace.
In case you’re already using a development framework (such as MVVMLight) and cannot or don’t want to change your ViewModel’s base class, please refer to Using PDFx with an existing 3rd party framework to learn how you can merge the PDFx into those scenarios.