Skip to content

[automated] Merge branch 'net11.0' => 'release/11.0.1xx-preview3'#34875

Open
github-actions[bot] wants to merge 2 commits intorelease/11.0.1xx-preview3from
merge/net11.0-to-release/11.0.1xx-preview3
Open

[automated] Merge branch 'net11.0' => 'release/11.0.1xx-preview3'#34875
github-actions[bot] wants to merge 2 commits intorelease/11.0.1xx-preview3from
merge/net11.0-to-release/11.0.1xx-preview3

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 8, 2026

I detected changes in the net11.0 branch which have not been merged yet to release/11.0.1xx-preview3. I'm a robot and am configured to help you automatically keep release/11.0.1xx-preview3 up to date, so I've opened this PR.

This PR merges commits made on net11.0 by the following committers:

  • jfversluis

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout net11.0
git pull --ff-only
git checkout release/11.0.1xx-preview3
git pull --ff-only
git merge --no-ff net11.0

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-preview3
or if you are using SSH
git push git@github.com:dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-preview3

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/net11.0-to-release/11.0.1xx-preview3'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.

git fetch
git checkout -b merge/net11.0-to-release/11.0.1xx-preview3 origin/release/11.0.1xx-preview3
git pull https://github.com/dotnet/maui merge/net11.0-to-release/11.0.1xx-preview3
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-preview3
or if you are using SSH
git fetch
git checkout -b merge/net11.0-to-release/11.0.1xx-preview3 origin/release/11.0.1xx-preview3
git pull git@github.com:dotnet/maui merge/net11.0-to-release/11.0.1xx-preview3
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-preview3

Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.

jfversluis and others added 2 commits April 8, 2026 12:30
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could <a
href="https://github.com/dotnet/maui/wiki/Testing-PR-Builds">test the
resulting artifacts</a> from this PR and let us know in a comment if
this change resolves your issue. Thank you!

## Description

Adds badge notification support to Shell bottom tabs on all platforms
(Android, iOS, MacCatalyst, Windows).

Closes #8305 (first iteration — bottom tabs)

### New API

Three new bindable properties on `BaseShellItem`:

| Property | Type | Description |
|----------|------|-------------|
| `BadgeText` | `string?` | Text/number displayed on the badge. `null` =
no badge, `""` = dot indicator, non-empty = text/count badge. |
| `BadgeColor` | `Color?` | Background color of the badge. `null` uses
the platform default. |
| `BadgeTextColor` | `Color?` | Foreground (text) color of the badge.
`null` uses the platform default (typically white). |

### XAML Usage

```xml
<Shell>
    <TabBar>
        <ShellContent Title="Home" BadgeText="3" BadgeColor="Red" BadgeTextColor="White" />
        <ShellContent Title="Alerts" BadgeText="" /> <!-- dot indicator -->
    </TabBar>
</Shell>
```

### Platform Implementation

| Platform | Approach | Notes |
|----------|----------|-------|
| **Android** | `BottomNavigationView.GetOrCreateBadge()` /
`BadgeDrawable` | Full text + color support. `ClearNumber()` for dot
mode. |
| **iOS/MacCatalyst** | `UITabBarItem.BadgeValue` / `BadgeColor` /
`SetBadgeTextAttributes` | Full text + color support. Empty string shows
native dot. |
| **Windows** | `InfoBadge` on `NavigationViewItem` via ViewModel
binding | Numeric values show number; non-numeric/empty shows dot
indicator. |

### Dot Badge Support

Setting `BadgeText = ""` (empty string) displays a small dot indicator
without text on all platforms. This is distinct from `null` which hides
the badge entirely.

### What's Included

- 3 BindableProperties on `BaseShellItem` with full XML documentation
- Platform handlers for Android, iOS/MacCatalyst, and Windows
- 28 unit tests (`ShellBadgeTests.cs`)
- 4 UI screenshot tests (`Issue8305.cs`)
- Interactive sample gallery page (`ShellBadgeGallery`)
- PublicAPI.Unshipped.txt entries for all 7 TFMs

### What's NOT Included (follow-up work)

- Flyout item badges
- Top tab badges
- These are tracked in the original issue #8305 for future iterations

### Screenshots

<img width="1080" height="2400" alt="screen12"
src="https://github.com/user-attachments/assets/b2b0cd76-a022-4e5a-88a2-82dd89da79d7"/>

### Testing

- All 28 unit tests pass
- All 85 existing Shell unit tests pass (no regression)
- UI test projects compile successfully
- Manually tested on physical Android device

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Versions.props
- eng/common/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant