The following code throws an exception. Can you spot the bug?
public class MyControl : Control
{
public static DependencyProperty MyPropertyProperty = DependencyProperty.Register(
"MyProperty",
typeof (double),
typeof (MyControl),
new PropertyMetadata(0));
public double MyProperty
{
get { return (double) GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
}
Posted
03-09-2010 3:36 PM
by
Christopher Bennage