Issue with TabbedPageRenderer Causing IconImageSource to Disappear on CurrentPageChanged Event

Thinh NPD 40 Reputation points
2024-12-25T04:12:13.8466667+00:00

I am experiencing an issue with the custom implementation of TabbedPageRenderer in .NET MAUI. When the CurrentPageChanged event is invoked, the IconImageSource for the tabs intermittently disappears. This behavior seems related to how the renderer handles updates to the tab layout and icons during page changes.

Here are the key details of the implementation:

  • A custom renderer (FTabbedRenderer) is being used to customize tab properties, including badge views and icon updates.
  • The OnElementChanged method initializes the layout and adds custom badges to the tabs.
  • The CurrentPageChanged event updates the IconImageSource for tabs dynamically based on the selected state.
  • When load
    CleanShot 2024-12-25 at 11.11.03@2x
  • When change page
  • CleanShot 2024-12-25 at 11.11.48@2x
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,763 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.