Silverlight application for Windows Phone in VB.NET

In this article you will see how to create an simple silverlight application for windows phone.
  • 2080

 Windows Phone: Silverlight for Windows Phone is one of the most exciting things to come along since the original release of Silverlight. Now I can take my same Silverlight/WPF skills and use them not only on the web, and on the desktop, but also on the Windows Phone.

Silverlight can also access the unique capabilities of the phone including:

  • Hardware acceleration for video and graphics
  • Accelerometer for motion sensing
  • Multi-touch
  • Camera and microphone
  • Location awareness
  • Push notifications
  • Native phone functionality

Windows Phone 7 offers the ability to write applications using the Silverlight platform, here is the classic Hello Windows Phone Application example brought to Windows Phone with VB and Visual Studio 2010 Express for Windows Phone.

Example of an Windows Phone application

<phone:PhoneApplicationPage 
    x:Class="SilverlightSimpleApplication.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    shell:SystemTray.IsVisible
="True">
   

    
<Grid x:Name="LayoutRoot" Background="Transparent" Width="503">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="PageTitle" Text="Helo Windows" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
      </Grid>
</
phone:PhoneApplicationPage>

Output Window

1.gif
 

Conclusion

Hope this article would help you to understand how to create an simple silverlight application for windows phone.

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.