2017-06-27 14 views
0

Je suis nouveau dans Windows Phone 8.1 développement silverlight. J'ai besoin d'aide dans l'élément de support rotatif automatique, quand je tourne le téléphone verticalement à horizontal. S'il vous plaît aidez-moi à résoudre ce problème.windows téléphone 8.1 silverlight mediaelement auto rotate

+0

aller directement à Windows 10 Développement d'applications UWP. La prise en charge du téléphone 8.1 se termine en juillet 2017 – magicandre1981

Répondre

0

Que diriez-vous de l'essayer en ajoutant ceci à votre page;

SupportedOrientations = Orientation "PortraitOrLandscape" = "Portrait"

comme dans cet exemple

<phone:PhoneApplicationPage 
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" 

    x:Class="Yourproject.Page1" 
    mc:Ignorable="d" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}" 
    FontSize="{StaticResource PhoneFontSizeNormal}" 
    Foreground="{StaticResource PhoneForegroundBrush}" 
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" 
    shell:SystemTray.IsVisible="False" Background="#FF0F0F0F">