We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repo: https://github.com/dotnet/maui-samples/tree/main/8.0/Fundamentals/Shell
When I set the Background|BackgroundColor property for DataTemplate "AnimalTemplate": App.xaml:
Background|BackgroundColor
<DataTemplate x:Key="AnimalTemplate"> <Grid Padding="10" Background="Pink" ....
the setting above disables the BackgroundColor settings for the selected state for targettype Grid inside of CatsPage.xaml:
BackgroundColor
selected
Grid
CatsPage.xaml:
<ContentPage.Resources> <Style TargetType="Grid"> <Setter Property="VisualStateManager.VisualStateGroups"> <VisualStateGroupList> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> <VisualState x:Name="Selected"> <VisualState.Setters> <Setter Property="BackgroundColor" Value="Green" /> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateGroupList> </Setter> </Style> </ContentPage.Resources>
AnimalTemplate is the ItemTemplate for the CollectionView.
AnimalTemplate
ItemTemplate
CollectionView
Result: Items' BackgroundColor doesn't change.
Expected Result: Selected items'backgroundColor changes to green background.
Repro:
App.xaml
The previously selected cat is in selected state, but backgroundColor didn't change.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Repo: https://github.com/dotnet/maui-samples/tree/main/8.0/Fundamentals/Shell
When I set the
Background|BackgroundColor
property for DataTemplate "AnimalTemplate":App.xaml:
the setting above disables the
BackgroundColor
settings for theselected
state for targettypeGrid
inside of CatsPage.xaml:CatsPage.xaml:
AnimalTemplate
is theItemTemplate
for theCollectionView
.Result:
Items' BackgroundColor doesn't change.
Expected Result:
Selected items'backgroundColor changes to green background.
Repro:
App.xaml
The previously selected cat is in selected state, but backgroundColor didn't change.
The text was updated successfully, but these errors were encountered: