A group blog from members of the VB team
I have experienced a lot of fun writing Windows Phone 7 applications in Visual Basic. Web browser is one of the applications that is commonly used on phones these days. In this blog post, I want to share some sample source code that will help you to create a mini browser application for Windows Phone 7. I will now demonstrate how easy it is to develop a mini browser application for Windows Phone 7, using Visual Basic for Windows Phone Developer Tools.
The mini browser application can be created in 3 simple steps:
Before you create a mini browser application, you need to install the following applications:
To create a mini browser application, follow the 3 simple steps mentioned earlier:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<TextBox Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,120,0" Name="textBox1" Text="http://www.xbox.com" VerticalAlignment="Top" />
<Button Content="Go" Height="Auto" HorizontalAlignment="Right" Name="button1" VerticalAlignment="Top" Width="Auto" Click="button1_Click" />
<phone:WebBrowser HorizontalAlignment="Stretch" Margin="0,84,0,0" Name="webBrowser1" VerticalAlignment="Stretch" Height="Auto" Width="Auto" />
</Grid>
Your application now looks like this:
It is essential to add an event handler to the application because it helps to navigate to the entered URL.
To add an event handler, do the following:
Partial Public Class MainPage
Inherits PhoneApplicationPage
' Constructor
Public Sub New()
InitializeComponent()
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles button1.Click
End Class
Private Sub button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim site As String
site = textBox1.Text
webBrowser1.Navigate(New Uri(site, UriKind.Absolute))
Voila! Your mini browser application for Windows Phone 7 is ready! Now you just need to build and debug the application.
To submit your application to the market place, you can refer to upload your application walkthrough.
That’s it! You have now successfully created your first Windows Phone 7 Silverlight application, that too in just 3 simple steps! You can find the full source code for the Visual Basic Mini Browser application here. This application uses general Silverlight and Visual Basic features.
Hi I write It In My App But When I Want run It After Run And After I Click On Go Button The Page Was didn't loaded
Tnx:D