Skip to content

Instantly share code, notes, and snippets.

View ArthurMbraga's full-sized avatar

Arthur Martins ArthurMbraga

View GitHub Profile
@wendazhou
wendazhou / ManualValidation.cs
Created March 26, 2013 16:10
A simple helper to manually toggle WPF validation on FrameworkElements.
/// <summary>
/// Provides helpers to manually toggle validation errors.
/// </summary>
public static class ManualValidation
{
// this dummy attached property is used as a source
// of the binding.
static readonly DependencyProperty DummyProperty =
DependencyProperty.RegisterAttached("DummyProperty", typeof(object), typeof(ManualValidation), new PropertyMetadata(null));