Default value for DP does not match your type.
Edit
public static readonly DependencyProperty ToothProperty = DependencyProperty.Register("Tooth", typeof(Tooth), typeof(ToothUI), new PropertyMetadata(0));
to
public static readonly DependencyProperty ToothProperty = DependencyProperty.Register("Tooth", typeof(Tooth), typeof(ToothUI), new PropertyMetadata(default(Tooth)));
Or simply omit the default value for DP:
public static readonly DependencyProperty ToothProperty = DependencyProperty.Register("Tooth", typeof(Tooth), typeof(ToothUI));
Rohit Vats Dec 05 '13 at 11:27 2013-12-05 11:27
source share