Je porte une application de Windows Phone 7.x Silverlight à Windows 10 Mobile. Je l'habitude d'être en mesure de vérifier l'orientation et définir l'orientation de l'application de la manière suivante:Windows 10 mobile orrientation toujours là?
if (DeviceStatus.IsKeyboardDeployed)
{
if (Dispatcher.HasThreadAccess)
{
SupportedOrientations = SupportedPageOrientation.Landscape;
Orientation = PageOrientation.Landscape;
}
else
{
Dispatcher.BeginInvoke(() =>
{
SupportedOrientations = SupportedPageOrientation.Landscape;
Orientation = PageOrientation.Landscape;
});
}
}
Quand je veux faire en UWP il est impossible et la seule façon de définir l'orientation à quelque chose est de faire ce qui suit:
var k = Orientation.Horizontal;
Bien sûr, cela ne fait rien parce que je dois attribuer k à l'orientation, mais il n'y a rien à faire ..
est-ce encore possible?