我是windows phone應用程序開發的新手。我正在開發Windows 8.0的應用程序。我無法在項目中找到文件[Package.appxmanifest]。在Windows Phone 8.0應用程序中啓用定位
在打開方向的應用程序中是否有設置?因爲當我旋轉手機時,我的控件在potrait模式下保持不變。
任何人都可以引導我嗎?
我是windows phone應用程序開發的新手。我正在開發Windows 8.0的應用程序。我無法在項目中找到文件[Package.appxmanifest]。在Windows Phone 8.0應用程序中啓用定位
在打開方向的應用程序中是否有設置?因爲當我旋轉手機時,我的控件在potrait模式下保持不變。
任何人都可以引導我嗎?
Package.appxmanifest
是一個WP8.1運行時的東西。對於WP 8.0,它是AppManifest
和WMAppManifest
。您可以在項目解決方案下的屬性下找到它。
至於方向,請單擊您的MainPage.xaml中,選擇您的<phone:PhoneApplicationPage>
標籤。在Common下,您可以更改您的方向。
而且這裏有一個快速入門指南中的處理方向的變化:Quickstart: Screen orientation for Windows Phone 8
在你的設計師頁面會出現一個名爲SupportedOrientations的屬性。您可以將其更改爲Portrait,Landscape或PortraitOrLandscape。
開發中如果要更改方向,請使用「方向」屬性。
<phone:PhoneApplicationPage
x:Class="TemplateSwitcher.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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">