Answer the question
In order to leave comments, you need to log in
How to switch to another page when changing orientation?
Hello, this is the question. Added one page in portrait mode (Page2) and one in landscape mode (Page2_Landscape) to the application. How to connect them?
That is, how to make it so that, being on this page in portrait mode (Page2), we change the mode to landscape and switch to the landscape version of this page (Page2_Landscape)?
I was thinking of doing it with something like this:
public Page2()
{
InitializeComponent();
this.OrientationChanged +=
new EventHandler<OrientationChangedEventArgs>(Page2_OrientationChange);
}
void Page2_OrientationChange (object sender,OrientationChangedEventArgs e)
{
if ((e.Orientation == PageOrientation.LandscapeRight)||(e.Orientation == PageOrientation.LandscapeLeft))
{
/*Тут, по идее, должен реализовываться переход на альбомную страничку. Как это сделать я не знаю :-( */
}
else if ((e.Orientation == PageOrientation.PortraitDown)||(e.Orientation == PageOrientation.PortraitUp))
{
}
}
Answer the question
In order to leave comments, you need to log in
You need to make it right, everything else is extremely wrong
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question