I've been googling this issue for some time now, but havent been able to find a solution that worked for me. The thing is I have a popup control with a user control, in which the user can enter a new value for a listpicker. This all works fine in portrait mode, but if the phone is rotated (emulator), the popup remains in portrait mode. Opening the popup when phone is already in landscape, has no effect either.
Is there any way to correct this issue? I've seen some people suggesting using Rotatetransform, but if I do this on a textbox etc., it disappears completely :/
I think this is potentially a bug in the Popup
control; I've certainly heard the question asked before. However, I've also heard that the performance of the Popup
controls is not that great, so I think you'd be better off just using a regular framework element (such as a Grid
) to contain your popup content and show/hide it (with animation if appropriate) accordingly. At least that way it will get rotated properly when the page orientation changes.
Do not rorate the popup but place a border inside the popup and load the content in the border.
I got it to work like this:
//In .xaml
<Popup x:Name="myPopup">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="480" />
</Grid.RowDefinitions>
<Border x:Name="popupBorder"/>
</Grid>
</Popup>
//In .xaml.cs
popupBorder.Child = new MyPopupPage(); //MyPopupPage is the "Windows Phone Landscape Page"
myPopup.IsOpen = true;
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