-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[.NET 10] make TabbedPageManager public #30774
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request makes the TabbedPageManager class public in .NET MAUI for Android and adds APIs to swap it on TabbedPage.Android. This change exposes the internal tabbed page management functionality to allow for more customization of tabbed page behavior on Android.
Key changes:
- Expose
TabbedPageManageras a public class with customizable APIs - Add getter/setter property on
TabbedPagefor managing theTabbedPageManagerinstance - Update visibility modifiers from internal/private to public/protected for extensibility
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
TabbedPage.Android.cs |
Adds public TabbedPageManager property with validation logic for instance swapping |
PublicAPI.Unshipped.txt |
Documents new public APIs being exposed for the TabbedPageManager class |
TabbedPageManager.cs |
Changes class from internal to public and updates member visibility for extensibility |
Comments suppressed due to low confidence (2)
src/Controls/src/Core/Platform/Android/TabbedPageManager.cs:45
- The field name 'previousPage' does not follow C# naming conventions. Protected and public fields should use PascalCase naming. Consider renaming to 'PreviousPage'.
protected Page previousPage;
src/Controls/src/Core/Platform/Android/TabbedPageManager.cs:541
- The method 'SetTabIconImageSource' is marked as virtual in the PublicAPI but declared as non-virtual here. This inconsistency should be resolved by making the method virtual to match the public API contract.
void SetTabIconImageSource(Page page, TabLayout.Tab tab)
| { | ||
| if (_tabbedPageManager is not null && _tabbedPageManager != value) | ||
| { | ||
| throw new InvalidOperationException("TabbedPageManager cannot be assigned to new instance."); |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces a new public API with the TabbedPageManager property setter. Since this is a breaking change to the public API surface, please alert reviewers that this should not be included in minor versions or service releases per the coding guidelines.
Copilot uses AI. Check for mistakes.
| } | ||
|
|
||
| internal void UpdateTabItemStyle() | ||
| protected virtual void UpdateStyleForTabItem() |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method 'UpdateStyleForTabItem' appears to duplicate the functionality of the existing 'UpdateTabItemStyle' method. Consider removing the wrapper method and making UpdateStyleForTabItem the primary method to avoid code duplication.
Copilot uses AI. Check for mistakes.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems something on the public api files missing
C:\a\_work\1\s\src\Controls\src\Core\PublicAPI\net-android\PublicAPI.Unshipped.txt(28,1): error RS0025: The symbol '~virtual Microsoft.Maui.Controls.PropertyChangingEventHandler.Invoke(object sender, Microsoft.Maui.Controls.PropertyChangingEventArgs e) -> void' appears more than once in the public API files (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net9.0-android35.0]
8668 Warning(s)
1 Error(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes
78ab6ec to
0440557
Compare
0440557 to
c2cc46f
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
188d66d to
bb7ef39
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on people wanting to customize the tabs, so this seems like a good way for them to do that
|
/backport to release/10.0.1xx-preview7 |
|
Started backporting to release/10.0.1xx-preview7: https://github.com/dotnet/maui/actions/runs/16578072896 |
Warning
This should target .NET 10 before merge
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Make
TabbedPageManagerpublic and add APIs to swap it onTabbedPage.Android.Issues Fixed
Related to #30762