'how to disable grid view onclick highlight the grid item. XAML UWP
In the image below I have a grid view of round Buttons & for some reason the grid view is also clickable and stays highlighted after you click the grid view box
<GridView x:Name="ShowmanshipGridview" ScrollViewer.VerticalScrollBarVisibility="Disabled" Height="274" Canvas.Top="107" Width="374" HorizontalAlignment="Left" VerticalAlignment="Center" Canvas.Left="12">
<Button
Content="4.0"
CornerRadius="90,90,90,90"
Height="88" Width="88" FontSize="48" Foreground="White" Click="Showmanship_Button_Click" >
<Button.FocusVisualSecondaryBrush>
<SolidColorBrush Color="{ThemeResource SystemChromeGrayColor}"/>
</Button.FocusVisualSecondaryBrush>
<Button.Background>
<SolidColorBrush Color="{StaticResource ButtonBlue}"/>
</Button.Background>
</Button>
<Button
Content="4.1"
CornerRadius="90,90,90,90"
Height="88" Width="88" FontSize="48" Foreground="White" Click="Showmanship_Button_Click">
<Button.FocusVisualSecondaryBrush>
<SolidColorBrush Color="{ThemeResource SystemChromeGrayColor}"/>
</Button.FocusVisualSecondaryBrush>
<Button.Background>
<SolidColorBrush Color="{StaticResource ButtonBlue}"/>
</Button.Background>
</Button>
<Button
Content="4.2"
CornerRadius="90,90,90,90"
Height="88" Width="88" FontSize="48" Foreground="White" Click="Showmanship_Button_Click">
<Button.FocusVisualSecondaryBrush>
<SolidColorBrush Color="{ThemeResource SystemChromeGrayColor}"/>
</Button.FocusVisualSecondaryBrush>
<Button.Background>
<SolidColorBrush Color="{StaticResource ButtonBlue}"/>
</Button.Background>
</Button>
<Button
Content="4.3"
CornerRadius="90,90,90,90"
Height="88" Width="88" FontSize="48" Foreground="White" Click="Showmanship_Button_Click">
<Button.FocusVisualSecondaryBrush>
<SolidColorBrush Color="{ThemeResource SystemChromeGrayColor}"/>
</Button.FocusVisualSecondaryBrush>
<Button.Background>
<SolidColorBrush Color="{StaticResource ButtonBlue}"/>
</Button.Background>
</Button>
</GridView>
Solution 1:[1]
The pointer hove rectangle like the above screenshot is ListViewItemPresenter style where in GridViewItem. if you want to remove them, you could edit the default GridViewItemBackgroundPointerOver value as Transparent and set GridViewItemRevealBorderThemeThickness as zero at same time. You could copy the following and into Application.Resources directly.
<Thickness x:Key="GridViewItemRevealBorderThemeThickness">0</Thickness>
<SolidColorBrush Color="Transparent" x:Key="GridViewItemBackgroundPointerOver" />
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

