-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Microsoft .NET Framework 4.5 Quickstart Cookbook
By :
The INotifyDataErrorInfo interface has been a .NET citizen for some time, at least for Silverlight developers. It brought a new improved system for validating data, which we now have in WPF, with all of its power and interesting things to discover.
In order to use this recipe you should have Visual Studio 2012 installed.
In this recipe we will explain how to use this new powerful feature of WPF in .NET 4.5.
First, open Visual Studio 2012 and create a new project. We will select the WPF Application template from the Visual C# category and name it WPFValidation.
Create a class named BaseClass.cs. Edit it and implement the interfaces INotifyPropertyChanged and IDataErrorInfo. We can copy the following code inside it:
public abstract class BaseClass : INotifyPropertyChanged, INotifyDataErrorInfo
{
private static Dictionary<string, PropertyChangedEventArgs> argumentInstances = new Dictionary<...
Change the font size
Change margin width
Change background colour