Fixed IsEnabled Property not works on Tabs #26728
Open
+214
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Details
In the Shell, when the Tab.isEnabled property is set to false, the tab should be non-interactive and prevent user interaction. the current behavior allows the tab to be clicked.
Root Cause
The IsEnabled property is not correctly mapped to the TabBar.Items.IsEnabled property on iOS and macOS. In Windows, implementation property for IsEnabled property is not handled.
Description of change
A new method, UpdateCellEnabled, has been created to map the ShellSection.IsEnabled value to the Tabbar.Items.IsEnabled property on the iOS platform.
For the Windows platform, a new property was added to the NavigationViewItemViewModel and registered within the NavigationViewItem in the TabbedPageXaml.Windows page. The BaseShellItem.IsEnabled property is now mapped to the newly introduced IsEnabled property in the NavigationViewItemViewModel. Additionally, the IsEnabled property has been updated to respond to runtime changes through the property-changed event.
Validated the Behavior in the following Platforms
Issue fixed
Fixes #5161
Screenshots
BeforeFix-5161.1.mov
AfterFix-5161.1.mov