Open Toomas75 opened 8 months ago
Microsoft.Maui.Controls and Microsoft.Maui.Controls.Compatibility 8.0.10-nightly.10055
`<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MauiBug.CollectionViewCurrentRow" Title="CollectionViewCurrentRow">
`public partial class CollectionViewCurrentRow : ContentPage { public ICommand IsEnabledTriggerCmd { get; set; } public ICommand ParentGridIsEnabledTriggerCmd { get; set; } public object SelectedItemValue { get; set; } public ArrayList Values { get; set; } public CollectionViewCurrentRow() { //https://github.com/dotnet/maui/issues/20615 InitializeComponent();
IsEnabledTriggerCmd = new Command(IsEnabledTriggerCmd_Executed);
ParentGridIsEnabledTriggerCmd = new Command(ParentGridIsEnabledTriggerCmd_Executed);
Values = ["First", "Second", "Third"];
SelectedItemValue =Values[0]!;
BindingContext = this;
}
private void IsEnabledTriggerCmd_Executed()
{
List.IsEnabled = false;
List.IsEnabled = true;
}
private void ParentGridIsEnabledTriggerCmd_Executed()
{
ParentGrid.IsEnabled = false;
ParentGrid.IsEnabled = true;
}
}`
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
This is major issue for us in big project.
https://github.com/dotnet/maui/issues/10595 https://github.com/dotnet/maui/issues/9523
It seems to me the issue is more basic. Where as any change effecting a CollectionView
SelectedItem(s)
VisualState
will result in the View
losing its Selected
state Style
In this demonstration video attached, you can see simply changing the items VisualState
to any of its other CommonStates
, the Selected style will be lost when it should return to the Selected
state.
Green = Selected
Orange = Focused
,
Red = PointerOver
There of course needs to be a priority of VisualStates
, to which only one can be active at once, but its only the Selected state which appears to not be reactivated when appropriate.
https://github.com/dotnet/maui/assets/13371986/b6f61bb6-d0ba-421b-8d71-f12556e36cc5
Sadly , another simple yet seemingly misunderstood bug that might likely address loads of other reported issues if fixed https://github.com/dotnet/maui/issues/10595 https://github.com/dotnet/maui/issues/13056 https://github.com/dotnet/maui/issues/13885 etc....
@samhouts @PureWeen Please could you take another look at this. Easily testable. I also think fixing this will resolve lot of the issues.
8.0.20-nightly.10336 - issue still persist
8.0.40-nightly.10491 - no news.
The same happens if collectionview is inside RefreshView and refreshview command CanExecute =false
Hello, I would like to know if somebody found a workaround for this ? I am having nightmares trying to work with CollectionView on Windows... :( I am simply trying to be able to define Selected and Hovered background color but as discussed here the Selected visual state is lost everytime something happens like moving the cursor away from the selected item. Thanks for any help
I can repro this issue at android platform on the latest 17.12.0 Preview 1.0(8.0.80 & 8.0.3), but it can't be reproduced on .NET 7. It's a regression from .NET 7 to .NET 8.
Description
CollectionView selecteditem background lost if collectionview (or parent) IsEnabled changed. And buttons "ripple" effect still missing.
Steps to Reproduce
Run attached project -> click buttons. MauiBug.zip
Link to public reproduction project repository
No response
Version with bug
Nightly / CI build (Please specify exact version)
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI, Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response