GridView - no frame at item selection on Windows 11
I am using GridView control in my UWP app. The grid shows games cover arts gallery. On Windows 10 i see the grid item gets a frame at item selection, but on Windows 11 no frame appears. How to make it working the same way like on Windows 10?
Universal Windows Platform (UWP)
-
Junjie Zhu - MSFT 17,401 Reputation points • Microsoft Vendor
2024-09-12T06:40:55.26+00:00 Hi
Welcome to Microsoft Q&A!
I tested it on Win11, and there is a frame when selecting an item. Could you please share your screenshots to help me understand the problem?
Thank you.
-
60856927 46 Reputation points
2024-09-12T22:19:25.0466667+00:00 https://imgur.com/a/8nXSZkp
I clicked items inside the ContentDialog but as you can see nothing selected with a frame. On Windows 10 it always works. -
60856927 46 Reputation points
2024-09-12T22:45:57.3+00:00 Here Windows 10 screenshot where you can see the frame https://imgur.com/a/g27ZxUv
-
60856927 46 Reputation points
2024-09-12T22:47:51.6533333+00:00 On Windows 10 there is click animation but on Windows 11 no such animation and no frame appears after click.
-
Junjie Zhu - MSFT 17,401 Reputation points • Microsoft Vendor
2024-09-13T06:52:15.3366667+00:00 I tested it on Win11 22H2, it shows normally in a ContentDialog. Could you please provide a minimal-reproducible-example to help us further check the problem for you?
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
-
Roy Li - MSFT 33,091 Reputation points • Microsoft Vendor
2024-09-19T08:23:41.62+00:00 Hope you've been well. Any updates about this issue?
-
60856927 46 Reputation points
2024-09-22T13:34:06.24+00:00 var dialog = new ContentDialog(); var page = new Gallery(); dialog.Content = page; dialog.Title = "Test"; dialog.CloseButtonText = "Cancel"; dialog.DefaultButton = ContentDialogButton.Primary; dialog.PrimaryButtonText = "Save"; dialog.PrimaryButtonClick += (s, a) =>{}; await dialog.ShowAsync();
<Page x:Class="UwpApp1.Gallery" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UwpApp1" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Width="500"> <GridView x:Name="CoverArtsTable" Grid.Row="1" ItemsSource="{x:Bind CoverArts}" IsItemClickEnabled="True" ItemClick="CoverArtsTable_ItemClick" SelectionMode="Single" IsSynchronizedWithCurrentItem ="False" Margin="0 5 0 0"> <GridView.ItemContainerStyle> <Style TargetType="GridViewItem"> <Setter Property="Margin" Value="0,0,10,10"/> </Style> </GridView.ItemContainerStyle> <GridView.ItemTemplate> <DataTemplate x:DataType="x:String"> <Frame CornerRadius="5" Padding="0"> <Grid Width="155" Height="242" Background="DimGray"> <Image Name="CoverArtImage" AutomationProperties.AccessibilityView="Raw" Stretch="Fill" Source="{Binding}" /> </Grid> </Frame> </DataTemplate> </GridView.ItemTemplate> </GridView> </Page>
-
Junjie Zhu - MSFT 17,401 Reputation points • Microsoft Vendor
2024-09-24T08:56:38.7833333+00:00 Hello,
Thanks for the code, and I used your code to test, and I can't reproduce the same behavior. What is your win11 version? Have you tested it on other win11 devices?
Thank you.
-
60856927 46 Reputation points
2024-09-24T09:25:07.07+00:00 Your dialog looks like Windows 10 version but not Win 11.
Edition Windows 11 Pro
Version 23H2
Installed on 10/8/2022
OS build 22631.4169
Experience Windows Feature Experience Pack 1000.22700.1034.0
-
Junjie Zhu - MSFT 17,401 Reputation points • Microsoft Vendor
2024-09-24T09:36:08.3266667+00:00 I tested it on Win11 22H2, and have you tested it on other win11 devices?
Sign in to comment