public KeyboardPage() { InitializeComponent(); // Each scrollable area should be large enough to demonstrate scrolling double listHeight = Window.Current.Bounds.Height * 2; LeftList.Height = listHeight; MiddleList.Height = listHeight; // InputPaneHelper is a custom class that allows keyboard event listeners to // be attached to individual elements inputPaneHelper = new InputPaneHelper(); inputPaneHelper.SubscribeToKeyboard(true); inputPaneHelper.AddShowingHandler(CustomHandlingBox, new InputPaneShowingHandler(CustomKeyboardHandler)); inputPaneHelper.SetHidingHandler(new InputPaneHidingHandler(InputPaneHiding)); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { inputPaneHelper.SubscribeToKeyboard(false); inputPaneHelper.RemoveShowingHandler(CustomHandlingBox); inputPaneHelper.SetHidingHandler(null); }