Introduced
Distinctive Windows Phone 7.5 (SDK 7.1)
Developing a Windows Phone application with Silverlight
Using XNA to develop a Windows Phone application
Developing Windows Phone applications with Silverlight and XNA combinations (incorporating XNA in Silverlight)
Example
1. Use Silverlight to develop Windows Phone App Demo
MainPage.xaml
<phone:PhoneApplicationPage
x:Class="Silverlight.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"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<StackPanel>
<!--按钮-->
<Button Name="btn" Content="hello webabcd" />
</StackPanel>
</phone:PhoneApplicationPage>
MainPage.xaml.cs
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Net;
Using System.Windows;
Using System.Windows.Controls;
Using System.Windows.Documents;
Using System.Windows.Input;
Using System.Windows.Media;
Using System.Windows.Media.Animation;
Using System.Windows.Shapes;
Using Microsoft.Phone.Controls;
Namespace Silverlight
{public
partial class Mainpage:phoneapplicationpage
{public
MainPage () c17/>{
InitializeComponent ();
This. Loaded + + new Routedeventhandler (mainpage_loaded);
}
void Mainpage_loaded (object sender, RoutedEventArgs e)
{
//pop-up MessageBox information
btn. Click + = delegate {MessageBox.Show ("Hello Webabcd");}