I have been searching the web lately for an existing control that acts like a web browser control, with some specific features that I need.
I haven’t found one that has them, and so I wanted to leave a question here, hoping that someone can point out how I can do this, or even give me some tips on how to create one from scratch, which will ultimately be the solution.
I need a control that allows me to preview webpages, at the same time it allows me to edit it programatically. I don’t need to write HTML or text directly into the editor, but need to be able to click a button, and insert specific HTML code to the document, and refresh the preview.
I also need to be able to capture click events on the control. For example, I want to click a specific place on the control and get the HTML element that is at the mouse position. Regarding events, I would also need to be able to capture drag-and-drop, and it seems that natively, the browser control doesn’t also support this.
Even though I have tried out some different controls, none of them has these features, or allowed me to add them. So, I would really appreciate if someone could point me to the right direction, or maybe correct me if I am wrongly assuming it can’t be done with any of the existing .NET controls.
Thank you in advance for any help.
As far as I know, there is no such control. Moreover, writing one from scratch, that correctly rendered all modern HTML/CSS would be a major undertaking.
Even products like Microsoft Expression tends to have quirks in the way they display the HTML being edited.
I’m afraid you’ve got your work cut out for you.