I am using an MVVM pattern on WPF4, though I am new to both. I am looking for a good solution to using a WebBrowser control that can receive Javascript commands and communicate with the ViewModel. It needs the following:
- Ability to collect values from Javascript forms, and return them to the ViewModel
- Use Javascript to determine ReadyState before
- Running Javascript commands (setting form values, use form values for logical steps, submit form) some which happen across multiple page loads
The site being worked on is not under my control to edit or update. It makes heavy use of ActiveX and will not accept non-IE browsers (Awesomium will not work), so the standard WPF WebBrowser control is likely the only option.
This question provides a solution to binding the source of a browser control with an attached property. I think this could be adapted to use the navigate method to send javascript, though I am not sure how values could be returned to the Viewmodel. This is the major hurdle I need to get over.
Heavy Edit - Question receiving very low views and no answers, completely reworded