Property name in static DependencyProperty identifier is incorrect.
DependencyProperty.Register("RichTextEditControl", typeof(RichTextBox),
typeof(RichTextBoxToolbar), new FrameworkPropertyMetadata(null));
It should be RichTextBoxControl
instead of RichTextEditControl
.
OR
Rename wrapper CLR property to name RichTextEditControl
:
public RichTextBox RichTextEditControl
{
get { return (RichTextBox)GetValue(RichTextEditControlProperty); }
set { SetValue(RichTextEditControlProperty, value); }
}
Registered property name and wrapper property name should be in sync always.