i was wondering how can I handle screen rotations for windows 8 applications using c#?
I want to create several xaml files and just change them every time the screen orientation is changed. Is that even possible?
i was wondering how can I handle screen rotations for windows 8 applications using
Share
You can use the Device Window in Visual Studio to record state changes to your UI elements. In the Device Window you can select the other visual states (namely snapped, full screen portrait, full screen landscape, and filled) and then make the changes you need for the desired end state. Those changes are then captured in the VisualStateManager that’s part of your XAML file. The obvious benefit here is that “it just works”, you don’t have to detect orientation state yourself or do any fancy XAML replacements/substitution.
Step 3 of Navigation, layout, and views tutorial has an example of this – granted, it’s pretty simplistic, but should get the concepts across.