WPF WebBrowser control doesn't enter design mode when the document property is changed
问题 I have a frustrating problem. Here's a simplified version of what I'm doing: A UserControl in c# contains a toolbar and an embedded WebBrowser object. The toolbar contains an "Edit" button, which when clicked sets the webbrowser control in design mode. Another button, "Cancel", turns off design mode. Pseudocode (very simplified): public void SetDesignMode(bool dm) { IHTMLDocument2 doc = webBrowser.Document as IHTMLDocument2; if (dm) doc.designMode = "On"; else doc.designMode = "Off";