Guidance control

Asked

Viewed 56 times

3

I set the orientation of a page of my app as landscape, but it was static. If the user turns the screen 180º continues as a landscape but stays upside-down. How do I so that when the device is rotated the screen continues in landscape and track the user’s viewing position ?

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    this.navigationHelper.OnNavigatedTo(e);
    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
}

1 answer

2


For it to work use it that way:

Example:

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    this.navigationHelper.OnNavigatedTo(e);
    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped;
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.