I was getting a ArgumentNullException while trying to use the WinForns WebBrowser control in a WPF project.
<TabItem Header='Browser Control' x:Name='browseTab' > <WindowsFormsHost > <winForms:WebBrowser x:Name='postBrowser'></winForms:WebBrowser> </WindowsFormsHost> </TabItem>
The first time I viewed the Tab with the WebBrowser control it worked. If I switched to another tab and then back to ‘browseTab’ it threw the ArgumentNullException.
The solution, set an explicit width and height for the WindowsFormHost element. The default value for width and height is 0 and seems to be the cause of the exception.