I'm trying to do some smart resizing of XAML elements when the software keyboard is opened in my WP8 app, and for some reason the InputPane.Showing/Hiding events are never getting called. Inside my OnNavigatedTo
override, I have the following:
InputPane inputPane = InputPane.GetForCurrentView();
inputPane.Showing += (InputPane sender, InputPaneVisibilityEventArgs args) =>
{
outputTextScroller.Height -= args.OccludedRect.Height;
};
inputPane.Hiding += (InputPane sender, InputPaneVisibilityEventArgs args) =>
{
outputTextScroller.Height += args.OccludedRect.Height;
};
Putting breakpoints into the lambda expressions, I find that the code is never getting called. No exceptions are being thrown, and nothing else in the app seems to be malfunctioning. Does anyone know why these events would not be being triggered? The input pane is opened either when I tap a TextBox for data entry, or tap a TextBlock which then focuses the TextBox for that data entry.