Disable Hover Action on GridView RRS feed

  • Question

  • Hello,

    I'm working on a Windows 8 XAML app that has a GridView. This GridView has a single child item, which is defined in XAML. My xaml is similar to the following:

    <GridView x:Name="theGridView" Margin="0,-3,0,0" Padding="110,0,40,46"  SelectionMode="None" CanDragItems="False" CanReorderItems="False" IsItemClickEnabled="False" IsTapEnabled="False" AllowDrop="False" IsRightTapEnabled="False" ScrollViewer.IsHorizontalScrollChainingEnabled="False">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0">
          <StackPanel Orientation="Vertical">
            <TextBlock Text="Title 1" Style="{StaticResource SubheaderTextStyle}" />
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              <Border Grid.Row="0" Grid.Column="0" BorderThickness="2" BorderBrush="White" Height="150" Margin="3,0,3,3">
                <TextBlock Text="Hello"/>
              <Border Grid.Row="0" Grid.Column="1" BorderThickness="2" BorderBrush="White" Height="150" Margin="3,0,3,3">
                <TextBlock Text="World"/>

    Whenever I move my mouse over the grid view, the content turns a semi-transparent light white. Almost like a hover indicator. I want to remove the hover indicator. I don't want any indication when someone hovers over the GridView or any of its contents. I need to use a GridView because this is actually hosted in a SemanticZoom control. Regardless, does anyone know how I can disable or remove the hover indicator? As you can see from the code above, I've tried all of the properties that I can think of.

    Thank you

    Thursday, June 7, 2012 11:51 AM


  • You'll need to edit the GridViewItem control template and turn off highlighting by removing the visual state and/or the visuals related to highlighting. Look for the "PointerOverBorder" visual part and remove it and the animations that target it. Alternatively, if you want all ListView/GridViews in your application to not have a hover then you can change the ListViewItemPointerOverBackgroundThemeBrush brush value in your App.xaml to Transparent.

    Hope this helps,
    Program Manager
    This post is provided "as-is"
    Thursday, June 7, 2012 7:32 PM