-
-
Save mvacha/7fc73426cb9b1cb79f71032da2ce145b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| protected override void OnNavigatedTo(NavigationEventArgs e) | |
| { | |
| base.OnNavigatedTo(e); | |
| InputPane.GetForCurrentView().Showing += OnKeyboardShowing; | |
| InputPane.GetForCurrentView().Hiding += OnKeyboardHiding; | |
| } | |
| protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) | |
| { | |
| base.OnNavigatingFrom(e); | |
| InputPane.GetForCurrentView().Showing -= OnKeyboardShowing; | |
| InputPane.GetForCurrentView().Hiding -= OnKeyboardHiding; | |
| } | |
| private void OnKeyboardShowing(InputPane sender, InputPaneVisibilityEventArgs args) | |
| { | |
| MainPanel.Margin = new Thickness(0, 0, 0, args.OccludedRect.Height); | |
| } | |
| private void OnKeyboardHiding(InputPane sender, InputPaneVisibilityEventArgs args) | |
| { | |
| MainPanel.Margin = new Thickness(0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment