Hello,
I've currently writing a control that descends from RadRichTextBox, with an additional HtmlText dependency property, so that I can directly bind an HTML content to the RichTextBox. To avoid performances issues, the HtmlText dependency property should be updated only when the RichTextBox loses its focus.
First problem: The OnLostFocus virtual method is never called when the control loses its focus. This is contrary to the WPF guidelines: if an On<EventName> virtual method is defined it should be called to raise the event, so that descendant classes can override this method instead of adding an event handler. This has the advantage that we are sure that the control is notified before the event listeners and can act accordingly.
Second problem: The LostFocus event is called repeatidly: justr clicking on the control, when it doesn't have the focus raises it twice.