介紹
與眾不同 windows phone 7.5 (sdk 7.1)
使用 Silverlight 開發 Windows Phone 應用程式
使用 XNA 開發 Windows Phone 應用程式
使用 Silverlight 和 XNA 組合開發 Windows Phone 應用程式(在 Silverlight 中融入 XNA)
樣本
1、使用 Silverlight 開發 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() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainPage_Loaded); } void MainPage_Loaded(object sender, RoutedEventArgs e) { // 彈出 MessageBox 資訊 btn.Click += delegate { MessageBox.Show("hello webabcd"); }; } } }