I have a page with a Pivot, with TextBox controls. In landscape, the SIP (the virtual keyboard) is opffsetted right by 42 pixels, thus clipped to its right.
Another app of mine also has a similar page, without the offsetted keyboard problem. Before I dig more into the differences between the two, has anyone ever encountered this problem before? Can we consider this a bug with Windows Phone 7.1?
(it does occur on a real device too)
It is a bug in windows phone:
If you set the Mode property on the app bar to Minimised and then turn the thing to landscape, the app bar pops back out. The code that figures out where to show the keyboard doesn't realise this and displays the keyboard as if the app bar is still minimised.
I solved it by changing the mode of the app bar as the orientation changes:
private void phoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.LandscapeLeft || e.Orientation == PageOrientation.LandscapeRight)
{
this.ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
}
else
{
this.ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
}
}
This seems to solve the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With