Last active
April 15, 2016 10:10
-
-
Save igorkulman/250de623e9213bc3bf90 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
Fixed grammar error in your gist, please update it from my fork.