I have a WPF project using the MVVM model.
In my View, I have set up an invisible WebBrowser
named myWebBrowser which is used to perform actions on the net (it seems that when I create the WebBrowser
dynamically it does not work as intended).
I also have, in my View, a button which, when clicked, would normally launch a void action that is set up in the ViewModel. That's fine. The issue I am having is that I want that void to do some events such as:
myWebBrowser.Navigate(url)
myWebBrowser.LoadCompleted += WebBrowserLoaded;
and basically launch the process using the invisible WebBrowser
that is in the View.
How can I achieve this as the ViewModel refuses for me to use a control name to reference it?