4

Closed

Bug in AtDesignTimeChanged attached property registration

description

The latest change to Bind.cs results in System.ArgumentException being thrown when calling DependencyProperty.RegisterAttached method to register AtDesignTimeProperty. The property is declared as bool but a null is passed as a default value for it during registration. The fix would be to change the following:
    public static DependencyProperty AtDesignTimeProperty =
        DependencyProperty.RegisterAttached(
            "AtDesignTime",
            typeof(bool),
            typeof(Bind),
            new PropertyMetadata(null, AtDesignTimeChanged)
            );
to:
    public static DependencyProperty AtDesignTimeProperty =
        DependencyProperty.RegisterAttached(
            "AtDesignTime",
            typeof(bool),
            typeof(Bind),
            new PropertyMetadata(false, AtDesignTimeChanged)
            );
Closed Aug 15, 2012 at 4:51 AM by EisenbergEffect
Fixed in a58cb4f6ef2e

comments