Thursday, December 30, 2010

Crop the webbrowser control in a Windows Phone 7 app

When building my Windows Phone 7 app – I needed to login into LinkedIn – unfortunately the login page of LinkedIn does not seem to scale as well as the Twitter login page so I decided to only show a specific part of the page within the WebBrowser control for Windows Phone. I kind of got it working by using the Clip property (for reference see How to: Crop an object (Silverlight))

<phone:WebBrowser HorizontalAlignment="Stretch" 
Name="webBrowser1" VerticalAlignment="Stretch" Height="466" Width="480"
IsScriptEnabled="True" Visibility="Collapsed">
<RectangleGeometry Rect="0,0,400,300" />

1 comment:

Anonymous said...

Check this helpful link too it also explained very well about WebBrowser control in windows phone 7 development....