Skip to content

Instantly share code, notes, and snippets.

@igorkulman
Last active April 15, 2016 10:10
Show Gist options
  • Save igorkulman/250de623e9213bc3bf90 to your computer and use it in GitHub Desktop.
Save igorkulman/250de623e9213bc3bf90 to your computer and use it in GitHub Desktop.
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);
}
@mvacha
Copy link

mvacha commented Apr 15, 2016

Fixed grammar error in your gist, please update it from my fork.

@igorkulman
Copy link
Author

@mvacha fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment