Reputation: 2273
I would like to make the wpf webbroswer control read-only in the sense that I still want to be able to give users the ability to copy texts off of textfield etc but I dont want them to be ableto click button or submit forms. I wrapped the web browser control in a wpf user control. When I set the IsEnabled proerty to false, it works i.e the webbroswer control is disabled but the user cannot select text from the page...
Upvotes: 0
Views: 1360
Reputation: 69372
You can handle the WebBrowser's Navigating event and cancel it so that the user can't navigate to another page.
void myBrowser_Navigating(object sender, NavigatingCancelEventArgs e)
{
e.Cancel = true;
}
Upvotes: 4