Damien
Damien

Reputation: 2901

WinRT how to not have page go up when virtual key board appears Windows Phone 8.1

I have an AutoSuggestBox in a XAML Page for a Windows Phone 8.1 app and when i click on the AutoSuggestBox the whole page goes up. Does anyone know how to disable this feature?

Thanks

Edit: Here is the code fix, thank you Peter Torr - MSFT.

Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing += (s, args) =>
            {
                args.EnsuredFocusedElementInView = true;
            };

Upvotes: 1

Views: 156

Answers (1)

Peter Torr
Peter Torr

Reputation: 12019

You need to handle the InputPane.Showing event, and set the EnsuredFocusedElementInView property to true. This will stop Windows from trying to make the item come into view.

Upvotes: 2

Related Questions