Created
October 3, 2015 05:12
-
-
Save naotaco/e8c5a46d915777b29b54 to your computer and use it in GitHub Desktop.
Detect current screen orientation on UWP application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Page_Loaded(object sender, RoutedEventArgs e) | |
{ | |
DisplayInformation.GetForCurrentView().OrientationChanged += MainPage_OrientationChanged; | |
} | |
private void MainPage_OrientationChanged(DisplayInformation info, object args) | |
{ | |
Debug.WriteLine("orientation: " + info.CurrentOrientation); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment