Description
openedon May 6, 2024
Description
I have a ControlTemplate in a CustomView, which will receive two StackLayout StaffLayout and AdminLayout.
When I click Staff Tab, it will assign ControlTemplate with StaffLayout and I click item in layout, it will normal. And then change to click Admin Tab, it will assign ControlTemplate with AdminLayout.
Error occur when I click again to Staff Tab , and then click to item in layout, the app is crashed and error comeout in debug section.
I place debug breakpoint in when assign ControlTemplate and see that ControlTemplate updated to another one, and Item in it changes when tab changes. But when I click in item, the error occur. And this error only happen in Android platform, this work normal on iOS platform.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.6 SR1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11 and up
Did you find any workaround?
No response
Relevant log output
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Maui.Platform.MauiTextView'.