I am developing a Windows Universal App for Phone.
I have a List View and a button over it. I want to hide the button when I scroll down in the List View.
How can i catch the scrolling event? How can i access the ScrollViewer inside the ListView?
I tried several ways but none seems to work..
My XAML Code is:
<ListView x:Name="PostListView" Grid.Row="1"
IsItemClickEnabled="True"
ItemTemplate="{StaticResource PostItemTemplate}"
ItemsSource="{Binding Feed}"
ShowsScrollingPlaceholders="False"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollMode="Enabled"
IncrementalLoadingTrigger="Edge">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<ListViewItemPresenter
SelectedBackground="{StaticResource LightStandardColorBrush}"
SelectedPointerOverBackground="{StaticResource LightStandardColorBrush}"
PressedBackground="{StaticResource LightStandardColorBrush}"
SelectedPressedBackground="{StaticResource LightStandardColorBrush}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Tapped">
<core:InvokeCommandAction Command="{Binding PostItemTapped}" CommandParameter="{Binding ElementName=PostListView, Path=SelectedItem}"/>
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</ListView>