How to Keep smooth Navigation in self TabbedPage call on each Tab click Currentpagechanged event

Faiz Quraishi 145 Reputation points
2024-08-21T18:14:33.6333333+00:00

I am using .Net MAUI 8 API 34 .

I have multiple records in collection to load on TabbedPage.

On Page Load I am binding only first three and then on CurrentPageChanged event of TabbedPage

means when click on any Tab ,when CurrentPageChanged fire I am again loading next three record at a time based on TabNumber.

I have attached CurrentPageChanged event with my custom method as

CurrentPageChanged += CustomMethod on page load .

and custom method looks like

protected async void CustomMethod(object sender, EventArgs e)

{

 await Navigation.PushModalAsync(new MyTabbedPage(TabNumber), false);

}

Means calling same TabbedPage page on each Tab click

Issue:When clicking on next Tab first Tab bar below navbar is disappearing and then next page means same page is loading and then Next three tabs are loading on tabbedPage.

Its creating fluctuation and not smooth.

How can i set the navigation to same TabbedPage without fluctuation and very smooth .

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,469 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.