I’m trying to stop the selection of a gridview item when tapping on an item. Every time I tap an item it selects it and bring up the app bar.
The problem is, is that I need to handle the item tapped and item swipe selection events independently.
I want the item tap event to bind another listview on the page.. while I want the item swipe-select or right click to select the item and bring up the app bar.
I have the selectionChanged action working.. But it is working too well. It fires every time I tap an item. So I added the property to the grid item, IsTapEnabled=”False”. I’ve changed the location of my item tapped event handlers from the grid item to the gridview and still the selectionChanged event always fires.
Is there a way to stop the selectionChanged event for a gridview from getting fired off while handling item tapped events for its items?
Thanks!
gridview XAML:
<GridView x:Name="GridViewName" Grid.Column="1" Margin="0, 75, 0, 0"
CanReorderItems="True" CanDragItems="True"
SelectionChanged="GridViewTasks_SelectionChanged_1"
IsTapEnabled="False" Tapped="Grid_Tapped_1">
<GridView.ItemTemplate>
<DataTemplate>
<Grid Style="{Binding Style}" HorizontalAlignment="Left"
Width="250" Height="150"
Drop="VariableSizedWrapGrid_Drop_1" AllowDrop="True" >
...
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
you need following code in your
GridView