Skip to content
Discussion options

You must be logged in to vote

CoPilot AI got this question — here are a few practical ways you can currently intercept or override bottom tab clicks in .NET MAUI Shell, even though there’s no official “tab click event” yet.


1️⃣ Use CurrentItemChanged or Navigating events

Shell exposes events you can hook into when navigation changes.
You can detect when a tab is selected and run your own logic instead of navigating.

Shell.Current.Navigating += (s, e) =>
{
    if (e.Target.Location.OriginalString.Contains("//mytab"))
    {
        e.Cancel(); // stop default navigation
        // run your custom action here
    }
};

Pros: Simple to implement.
Cons: Fires for all navigation, so you’ll need to filter carefully.


2️⃣ Cus…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nicholasyin
Comment options

Answer selected by nicholasyin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants