private static void CheckBindingMode(BindingMode bindingMode)
{
if (!WafConfiguration.IsInDesignMode && bindingMode != BindingMode.OneWayToSource)
{
throw new InvalidOperationException("The binding mode of the IsValid attached dependency property must be 'Mode=OneWayToSource'!");
}
}
}