如何在 `GridView` 中启用显示突出显示
How to enable reveal highlighting in `GridView`
我正在开发目标版本和最小版本为 16299 的 UWP 应用程序。根据 documenation GridView
应该会自动为 FCU 显示突出显示。但是我什么也看不见。 AutoSuggestBox
也不起作用。但是,NavigationView
正在显示显示高光效果。
下面是XAML。该项目是在 Visual Studio 2017 15.5.2.
中使用 Windows Template Studio 1.5 开发的
<GridView Margin="{StaticResource MediumLeftRightMargin}">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid HorizontalAlignment="Center" Orientation="Horizontal" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
</GridView>
But I could not see anything. AutoSuggestBox is also not working. However, NavigationView is showing the reveal highlight effects.
GridView
自动使用Reveal
。问题是UWP默认浅色主题已经覆盖了reveal highlighting。
您可以将页面RequestedTheme
修改为深色,您会看到显示突出显示。
<Page
......
RequestedTheme="Dark >
</Page>
我正在开发目标版本和最小版本为 16299 的 UWP 应用程序。根据 documenation GridView
应该会自动为 FCU 显示突出显示。但是我什么也看不见。 AutoSuggestBox
也不起作用。但是,NavigationView
正在显示显示高光效果。
下面是XAML。该项目是在 Visual Studio 2017 15.5.2.
中使用 Windows Template Studio 1.5 开发的<GridView Margin="{StaticResource MediumLeftRightMargin}">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid HorizontalAlignment="Center" Orientation="Horizontal" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
<Border Margin="10" BorderBrush="Bisque" BorderThickness="1">
<Button Content="1" Width="150" Height="200" />
</Border>
</GridView>
But I could not see anything. AutoSuggestBox is also not working. However, NavigationView is showing the reveal highlight effects.
GridView
自动使用Reveal
。问题是UWP默认浅色主题已经覆盖了reveal highlighting。
您可以将页面RequestedTheme
修改为深色,您会看到显示突出显示。
<Page
......
RequestedTheme="Dark >
</Page>