mono/mono — pull request #648 by DavidKarlas (2013-05-24 19:53:12+00:00)
Title: DependencyObject default value

DependencyProperty of DependencyObject was throwing KeyNotFound exception instead of default value defined in PropertyMetadata.

I'm planning to use DependencyProperty to animate properties(mostly double and floats) of UI objects for example X or Y from 0 to 500. But this has nothing to do with WPF. i.e:
Tweener.fromTo(button, Button.PropertyX,0,500,TimeSpan.FromSeconds(2));

Sample code of bug:
```csharp
using System;
using System.Windows;
namespace ConsoleApplication1
{
class MainClass
{
public static void Main(string[] args)
{
DependencyPropertyTest g = new DependencyPropertyTest();
Console.WriteLine("Hello World!" + g.State);
//Mono throws KeyNotFound(underlying Dictionary)
//.Net prints "Hello World!True"
}
}

class DependencyPropertyTest : DependencyObject
{
public Boolean State
{
get { return (Boolean)this.GetValue(StateProperty); }
set { this.SetValue(StateProperty, value); }
}
public static readonly DependencyProperty StateProperty = DependencyProperty.Register(
"State", typeof(Boolean), typeof(DependencyPropertyTest), new PropertyMetadata(true));
}
}
```