I want to change the orientation property like the following below:
<Style x:Key="FlipViewStyleV" TargetType="FlipView">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<VirtualizingStackPanel AreScrollSnapPointsRegular="True" Orientation="Vertical" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
And I want to let it worked when the device orientation changed, the orientation property should also follow the change. But it does not worked when I add a button in the code-behind to change the orientation from vertical to horizontal, does some one know?
Looks like changing the
Orientationproperty of aFlipView'sItemsPaneldoesn't work for some reason. So here's an alternative.You will need to duplicate your
FlipView. One would implement aVerticalVirtualizingStackPaneland the other aHorizontalVirtualizingStackPanel.Define them in your page's
Resources.Then, you will want to use
SimpleOrientationSensorto monitor the phone's orientation changes.After you have subscribed to its
OrientationChangedevent,in its callback, simply hide and show the
FlipViews accordingly.