Change User Agent on WPF/XAML Web Browser control?
Is it possible to change the user agent on the XAML webbrowser control? The code as currently开发者_Go百科 written looks like this:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WpfApplication5.Window1"
x:Name="Window"
Title="Test01 - Browser"
Width="1024" Height="600">
<Grid x:Name="LayoutRoot">
<WebBrowser x:Name="webBrowser" Source="http://gmail.com"/>
</Grid>
</Window>
Is it possible to change the user agent of this control? I am a complete newbie, as in, less than 4 hours of total coding, so please forgive me if this is obvious to anyone else. I have searched the MSDN page for the control (http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx) with no apparent solution given, so I'm asking in the hopes that it is easy.
I have absolutely zero C# or XAML experience outside of today. I'm a classic ASP (web) guy who needs to move into the modern world of desktop programming. This is merely a test application to see if things are possible. Since I'm a classic web guy, having a basic application that I can test with to verify user agents would be a handy tool to have.
Thanks, Beems
UPDATE: There is no direct solution for this.
精彩评论