The default value type does not match the type of the property
Solution 1:
Default value
for DP
does not match your type.
Change
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 setting default value for your DP:
public static readonly DependencyProperty ToothProperty =
DependencyProperty.Register("Tooth", typeof(Tooth), typeof(ToothUI));
Solution 2:
I came here for the title of the question but my type was a decimal default value and i solved with this 0.0M https://msdn.microsoft.com/en-us/library/83fhsxwc.aspx