Skip to content
New issue

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

Applying visibility change to child controls #20154

Merged

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jan 25, 2024

Description of Change

Applying visibility change to child controls

Issues Fixed

Fixes #19139
Fixes #23573
Fixes #28012

Screen.Recording.2024-01-25.at.13.28.42.mov

@kubaflo kubaflo requested a review from a team as a code owner January 25, 2024 12:40
@ghost ghost added the community ✨ Community Contribution label Jan 25, 2024
@ghost
Copy link

ghost commented Jan 25, 2024

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@samhouts samhouts added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jan 25, 2024
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tj-devel709 Could we include a device or ui tests here?

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need more description about the change and maybe some discussion first. I m not sure we want to add this to our public API.

Also this would need device and unit tests for the new api

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 28, 2024

@rmarinho there was a short discussion in this issue #19139
Hmmm if the changes of IsEnabled or Input transparent propagate to child controls then that should be the case with isVisible Of course it is my opinion and I'm happy to find out why it might not be a good idea.

I will write tests once there is a decision on whether this change makes sense or not.

@tj-devel709
Copy link
Member

I added this PR here to address specifically with the next entry capability. I don't think we will need this PR (in regards to the next entry issue), but it could possibly be helpful for a different scenario!

@mattleibow
Copy link
Member

This PR seems sensible, but both WPF and UWP chose not to propagate this value. So I am asking some teams why they decided this: dotnet/wpf#8774

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, we just need a bunch more tests for a good few combinations so we can ensure we don't break somerthing later on and all things stay working as expected.

@mattleibow
Copy link
Member

Can you rebase?

@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 90d5d80 to 1b85ac4 Compare February 5, 2024 19:12
kubaflo added a commit to kubaflo/maui that referenced this pull request Feb 6, 2024
@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

Now the question is... Is this a breaking change for a SR that means it should wait for net9.0? Or is it OK and people need to be aware of the change?

kubaflo added a commit to kubaflo/maui that referenced this pull request Feb 10, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from b4370b4 to 549cd74 Compare February 10, 2024 00:33
@Eilon Eilon added area-controls-general General issues that span multiple controls, or common base classes such as View or Element and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
@jsuarezruiz
Copy link
Contributor

@kubaflo Could you rebase and fix the conflicts?. Thanks.
Let me know if can help with something.

kubaflo added a commit to kubaflo/maui that referenced this pull request Jun 13, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 549cd74 to 5de6439 Compare June 13, 2024 00:02
@kubaflo
Copy link
Contributor Author

kubaflo commented Jun 13, 2024

@jsuarezruiz done :)

@kubaflo kubaflo changed the base branch from main to net9.0 September 1, 2024 00:19
kubaflo added a commit to kubaflo/maui that referenced this pull request Sep 1, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from ecfb541 to 98aeecd Compare February 12, 2025 00:08
/// This method must always be called if some event occurs and the value of
/// the <see cref="IsVisibleCore"/> property will change.
/// </summary>
internal void RefreshIsVisibleProperty() =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make IsVisibleCore and RefreshIsVisibleProperty visible in .NET 10

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue to track for .NET 10 #27739

@mattleibow
Copy link
Member

mattleibow commented Feb 12, 2025

/azp run

This comment was marked as off-topic.

@jfversluis

This comment was marked as off-topic.

@github-actions github-actions bot force-pushed the applying-visibility-change-to-child-controls branch from 98aeecd to 60d1f1f Compare February 20, 2025 09:14
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis added this to the .NET 9 SR5 milestone Feb 20, 2025
@jfversluis
Copy link
Member

Issue1549.ResourcesInNonXFBaseClassesAreFound() unit test fails is that one relevant?

@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 60d1f1f to 51728af Compare February 20, 2025 12:41
@kubaflo
Copy link
Contributor Author

kubaflo commented Feb 20, 2025

@jfversluis Because of how propagation works I had to modify the test

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis dismissed rmarinho’s stale review February 25, 2025 11:35

Feedback addressed

@jfversluis jfversluis merged commit d988ddf into dotnet:main Feb 25, 2025
123 checks passed
@maonaoda
Copy link
Contributor

maonaoda commented Feb 28, 2025

@kubaflo
Something seems wrong

Unhandled Exception:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNextRare()
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.Maui.Controls.Internals.PropertyPropagationExtensions.PropagatePropertyChanged(String propertyName, Element element, IEnumerable children) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs:line 29
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.Controls.IPropertyPropagationController.PropagatePropertyChanged(String propertyName) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1781
at Microsoft.Maui.Controls.VisualElement.OnIsVisibleChanged(Boolean oldValue, Boolean newValue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1535
at Microsoft.Maui.Controls.VisualElement.<>c.<.cctor>b__435_6(BindableObject bindable, Object oldvalue, Object newvalue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 276
at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 676
at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Element/Element.cs:line 642
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 663
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 591
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 325
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Apply(Boolean fromTarget) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 167
at Microsoft.Maui.Controls.Internals.TypedBinding2.PropertyChangedProxy[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<OnPropertyChanged>b__16_0() in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 506
at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass9_0.<DispatchImplementation>b__0() in /Users/wangyk/Projects/Practice/my_maui/src/Core/src/Dispatching/Dispatcher.iOS.cs:line 21
at CoreFoundation.DispatchQueue.static_dispatcher_to_managed(IntPtr context) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/CoreFoundation/Dispatch.cs:line 379
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96
at XXX.Program.Main(String[] args) in /Users/wangyk/Projects/app-maui/XXX/Platforms/iOS/Program.cs:line 15
2025-02-28 11:19:18.763430+0800 XXX[53310:3897398] Received unhandled Objective-C exception that was marshalled from a managed exception: Collection was modified; enumeration operation may not execute. (System.InvalidOperationException)
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNextRare()
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.Maui.Controls.Internals.PropertyPropagationExtensions.PropagatePropertyChanged(String propertyName, Element element, IEnumerable children) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs:line 29
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.Controls.IPropertyPropagationController.PropagatePropertyChanged(String propertyName) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1781
at Microsoft.Maui.Controls.VisualElement.OnIsVisibleChanged(Boolean oldValue, Boolean newValue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1535
at Microsoft.Maui.Controls.VisualElement.<>c.<.cctor>b__435_6(BindableObject bindable, Object oldvalue, Object newvalue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 276
at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 676
at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Element/Element.cs:line 642
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 663
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 591
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 325
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Apply(Boolean fromTarget) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 167
at Microsoft.Maui.Controls.Internals.TypedBinding2.PropertyChangedProxy[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<OnPropertyChanged>b__16_0() in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 506
at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass9_0.<DispatchImplementation>b__0() in /Users/wangyk/Projects/Practice/my_maui/src/Core/src/Dispatching/Dispatcher.iOS.cs:line 21
at CoreFoundation.DispatchQueue.static_dispatcher_to_managed(IntPtr context) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/CoreFoundation/Dispatch.cs:line 379
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96
at XXX.Program.Main(String[] args) in /Users/wangyk/Projects/app-maui/XXX/Platforms/iOS/Program.cs:line 15

@maonaoda
Copy link
Contributor

I think, added
(this as IPropertyPropagationController)?.PropagatePropertyChanged(IsVisibleProperty.PropertyName);
may affect the control that changes the child element through ItemsSource

@kubaflo
Copy link
Contributor Author

kubaflo commented Mar 2, 2025

@kubaflo Something seems wrong

Unhandled Exception:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNextRare()
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.Maui.Controls.Internals.PropertyPropagationExtensions.PropagatePropertyChanged(String propertyName, Element element, IEnumerable children) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs:line 29
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.Controls.IPropertyPropagationController.PropagatePropertyChanged(String propertyName) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1781
at Microsoft.Maui.Controls.VisualElement.OnIsVisibleChanged(Boolean oldValue, Boolean newValue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1535
at Microsoft.Maui.Controls.VisualElement.<>c.<.cctor>b__435_6(BindableObject bindable, Object oldvalue, Object newvalue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 276
at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 676
at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Element/Element.cs:line 642
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 663
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 591
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 325
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Apply(Boolean fromTarget) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 167
at Microsoft.Maui.Controls.Internals.TypedBinding2.PropertyChangedProxy[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<OnPropertyChanged>b__16_0() in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 506
at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass9_0.<DispatchImplementation>b__0() in /Users/wangyk/Projects/Practice/my_maui/src/Core/src/Dispatching/Dispatcher.iOS.cs:line 21
at CoreFoundation.DispatchQueue.static_dispatcher_to_managed(IntPtr context) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/CoreFoundation/Dispatch.cs:line 379
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96
at XXX.Program.Main(String[] args) in /Users/wangyk/Projects/app-maui/XXX/Platforms/iOS/Program.cs:line 15
2025-02-28 11:19:18.763430+0800 XXX[53310:3897398] Received unhandled Objective-C exception that was marshalled from a managed exception: Collection was modified; enumeration operation may not execute. (System.InvalidOperationException)
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNextRare()
at System.Collections.Generic.List1.Enumerator[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.Maui.Controls.Internals.PropertyPropagationExtensions.PropagatePropertyChanged(String propertyName, Element element, IEnumerable children) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs:line 29
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.Controls.IPropertyPropagationController.PropagatePropertyChanged(String propertyName) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1781
at Microsoft.Maui.Controls.VisualElement.OnIsVisibleChanged(Boolean oldValue, Boolean newValue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1535
at Microsoft.Maui.Controls.VisualElement.<>c.<.cctor>b__435_6(BindableObject bindable, Object oldvalue, Object newvalue) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/VisualElement/VisualElement.cs:line 276
at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 676
at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/Element/Element.cs:line 642
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 663
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/BindableObject.cs:line 591
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 325
at Microsoft.Maui.Controls.Internals.TypedBinding2[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Apply(Boolean fromTarget) in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 167
at Microsoft.Maui.Controls.Internals.TypedBinding2.PropertyChangedProxy[[XXX.ViewModels.ConsultationHistoryPageViewModel, XXX, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<OnPropertyChanged>b__16_0() in /Users/wangyk/Projects/Practice/my_maui/src/Controls/src/Core/TypedBinding.cs:line 506
at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass9_0.<DispatchImplementation>b__0() in /Users/wangyk/Projects/Practice/my_maui/src/Core/src/Dispatching/Dispatcher.iOS.cs:line 21
at CoreFoundation.DispatchQueue.static_dispatcher_to_managed(IntPtr context) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/CoreFoundation/Dispatch.cs:line 379
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96
at XXX.Program.Main(String[] args) in /Users/wangyk/Projects/app-maui/XXX/Platforms/iOS/Program.cs:line 15

Can you provide a sample so that I can try to reproduce it? Thanks!

@maonaoda
Copy link
Contributor

maonaoda commented Mar 4, 2025

@kubaflo
Please see #28162
and you can also see that the bug size of CollectionView`s Header has not been solved.

@bmacombe
Copy link
Contributor

Now the question is... Is this a breaking change for a SR that means it should wait for net9.0? Or is it OK and people need to be aware of the change?

@mattleibow @kubaflo I think this is causing me issues in 9.0.50, we have some layout logic that depends on knowing the actually Set value of IsVisible, like the original behavior. I don't see how I can get the _isVisibleExplicit value even after the .net 10 changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element community ✨ Community Contribution platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟
Projects
Status: Done