I have this class
public class Tooth
{
public string Id {get;set;}
}
And this custrom control
public partial class To
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));