Navigation Problem In Xamarin Forms

Md Mosabbir Alam 0 Reputation points
2024-01-09T05:56:28.9+00:00

I am using Xamarin Forms in Visual Studio Community 2022 version 17.7.5

I have many screen in my app , After splash there are onboarding screen and then dashboard screen , in dashboard screen there are two option one is signup and second is login. Inside signup there are three more screen and then navigate back to dashboard screen ,

The problem are occur after the login screen i am unable to navigate to other page, when i am not adding any control in Login page then the navigation are working fine , but when i add some control in login page i am only navigating to one page after that one page navigation are not working .

I am adding my View Model Code which i used for navigation

    public class LoginViewModel : INotifyPropertyChanged
    {
        #region Properties
        public INavigation Navigation { get; set; }
        #endregion
        public event PropertyChangedEventHandler PropertyChanged;


        public LoginViewModel(INavigation navigation)
        {
            Navigation = navigation;
        }

        public Command SignupCommand
        {
            get
            {
                return new Command(async (e) =>
                {
                    await Navigation.PushAsync(new SignupPage());
                });
            }
        }

        public Command LoginCommand
        {
            get
            {
                return new Command(async (e) =>
                {
                    await Navigation.PushAsync(new NewJoinerPage());
                });
            }
        }
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}


Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
764 questions
{count} votes