Reputation: 7830
I have a Windows Store Application where I've been supplied a different background image asset depending on whether the app is running in Portrait or Landscape mode.
Other than this background image, there are no other orientation specific differences.
What is the tidiest way to implement this requirement?
Upvotes: 0
Views: 74
Reputation: 11228
You can set it in Window.Current.SizeChanged
handler:
Window.Current.SizeChanged += (sender, args) =>
{
if (ApplicationView.Value == ApplicationViewState.FullScreenLandscape)
{
// ...
}
else if (ApplicationView.Value == ApplicationViewState.FullScreenPortrait)
{
// ...
}
};
Upvotes: 2