0

Is it possible to change the user agent on the XAML webbrowser control? The code as currently 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

Beems
  • 801
  • 2
  • 13
  • 33
  • possible duplicate of [Specify User Agent for WPF WebBrowser Control](http://stackoverflow.com/questions/4670730/specify-user-agent-for-wpf-webbrowser-control) – Conrad Frix Jan 12 '11 at 23:50
  • Unique question. That one had no appropriate answer either – Beems Jan 13 '11 at 00:02
  • After much searching, it appears that this is not directly possible. Apparently we'll have to forget the idea – Beems Jan 15 '11 at 23:25

1 Answers1

1

UPDATE: There is no direct solution for this.

Beems
  • 801
  • 2
  • 13
  • 33