I'm hosting an EDrawSoft OfficeOCX in a WindowsFormsHost. (MVVM, C#, .Net 4.0) The control fills a tab in a tab control in a Telerik RadDocPanel.
Everything is working very well, until someone tries to open a damaged Office document which throws an error and seems to corrupt the OfficeOCX control.
I've found that re-initializeing the OfficeOCX control gets it working again, except that the WindowsFormsHost no longer fills the tab. Simply resizing the application fixes it up again.
I've tried calling Refresh on the OfficeOCX control which didn't work, but it's probably not the control that needs to be refreshed.
The control is being manipulated in a PropertyChangedCallback for a dependency property. MSDN suggests calling WindowsFormsHost.InvalidateVisual() but that didn't work either.
My next attempt will be to try to call a method on the Telerik RadDockPanel to force the repaint...however I can't figure out how.

    internal class CustomMenuBuilder : ContextMenuContentBuilder, IDisposable    {        private RadMenuItem InsertHyperLink;        private MyCustomRichTextBox richTextBox;        public CustomMenuBuilder(MyCustomRichTextBox  richTextBox)            : base(richTextBox)        {            this.richTextBox = richTextBox;            InsertHyperLink= new RadMenuItem            {                Header = CultureTasks.GetUIString("Infologic.Composite.Views.ILEditeur.CustomMenuBuilder.Message01", "Insert hyperlink"),                Icon = new Image()                    {                        Source = new BitmapImage(new Uri("pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Inserthyperlink.png"))                    }            };            InsertHyperLink.Tag = richTextBox;            InsertHyperLink.Click += InsertHyperlink_Click;        }        void InsertHyperlink_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)        {            this.richTextBox.MyInsertHyperlink();        }        protected override ContextMenuGroup CreateFieldCommands()        {            return null;        }        protected override ContextMenuGroup CreateHyperlinkCommands(bool forExistingHyperlink)        {            return null;        }        protected override ContextMenuGroup CreateTextEditCommands()        {            var commands = base.CreateTextEditCommands();            commands.Add(InsertHyperLink);          // OK            //commands.Insert(0, InsertHyperLink);  // KO -> stack overflow            return commands;        }        public void Dispose()        {            InsertHyperLink.Click -= InsertHyperlink_Click;            InsertHyperLink= null;            richTextBox = null;        }    }var richTextControl = new MyCustomRichTextBox                          {                              Name = string.Format("rtb{0}", increment),                              AcceptsTab = false,                              LayoutMode = DocumentLayoutMode.Flow,                              IsSelectionMiniToolBarEnabled = false,                              DocumentInheritsDefaultStyleSettings = true,                              FontFamily = fontFamily,                              ShowMergeFieldsHighlight = true,                              FontSize = fontSize,                              HorizontalScrollBarVisibility = ScrollBarVisibility.Auto                          };var builder = new CustomMenuBuilder(richTextControl);richTextControl.ContextMenu = new Telerik.Windows.Controls.RichTextBoxUI.ContextMenu();((Telerik.Windows.Controls.RichTextBoxUI.ContextMenu)richTextControl.ContextMenu).ContentBuilder = builder;