Reputation: 824
My XAML roughly looks as follows.
<FlipView>
<FlipViewItem>
<Grid Height="400" Background="Blue"/>
</FlipViewItem>
<FlipViewItem>
<Grid>
<FlipView x:Name="DigestFlipView" Style="{StaticResource DigestViewStyle}"/>
</Grid>
</FlipViewItem>
</FlipView>
And then in my DigestViewStype
I have made it vertical as follows:
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<ItemsStackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
What I want is, when swipe is vertical, only inner FlipView
should kick in. Also, when swipe is horizontal, only outer FlipView
should kick in.
I get the desired behavior if I replace inner FlipView
with a ListView
. ListView
scrolls for vertical swipes and FlipView
for horizontal ones. I have tried playing with templates with no luck. Is there a way to achieve what I need with FlipView
s?
Upvotes: 0
Views: 105
Reputation: 31841
A ScrollViewer
can scroll horizontally. A ScrollViewer
can scroll vertically. And, a ScrollViewer
can scroll both horizontally and vertically - you are calling this third case "diagonal" scrolling.
A ScrollViewer
has a feature where once it starts scrolling either horizontally or vertically, it will no longer scroll the opposite. It sounds like this is what you want. This feature is called "rails".
Upvotes: 1