Tertium
Tertium

Reputation: 6308

Portrait LiveConnect dialog in landscape Windows Phone app

I have Windows Phone Monogame XAML-based application with SupportedOrientations="Landscape" Orientation="Landscape" in GamePage.xml. I'm using LiveConnect lib and when I launch its initialization, Live Connect shows auth dialog - but it is in portrait orientation, but keyboard is shown as for landscape - obscuring dialog contents. If I specify SupportedOrientations="PortraitOrLandscape" - my app gets wrong resolution info and it's view can be rotated - I won't to prevent this.

How can I force LiveConnect to show landscape dialog? OR: how can I force my app to show portrait keyboard when portrait dialog is shown?

Thanks!

Upvotes: 0

Views: 66

Answers (1)

Tertium
Tertium

Reputation: 6308

The solution is simple - changing SupportedPageOrientation and Orientation whenever you want:

Deployment.Current.Dispatcher.BeginInvoke(delegate()
{
    GamePage.PageObject.SupportedOrientations = SupportedPageOrientation.Landscape;
    GamePage.PageObject.Orientation = PageOrientation.Landscape;
});

Upvotes: 1

Related Questions