Example #1
0
        public static MauiFragmentNavDestination AddDestination(
            IPage page,
            NavigationPageHandler navigationPageHandler,
            NavGraph navGraph,
            FragmentNavigator navigator)
        {
            var destination = new MauiFragmentNavDestination(navigator, page, navigationPageHandler);

            navGraph.AddDestination(destination);
            return(destination);
        }
Example #2
0
        public MauiFragmentNavDestination(Navigator fragmentNavigator, IPage page, NavigationPageHandler navigationPageHandler) : base(fragmentNavigator)
        {
            _ = page ?? throw new ArgumentNullException(nameof(page));
            _ = navigationPageHandler ?? throw new ArgumentNullException(nameof(navigationPageHandler));
            SetClassName(Java.Lang.Class.FromType(typeof(NavHostPageFragment)).CanonicalName);

            if (!Pages.ContainsKey(page))
            {
                Id = global::Android.Views.View.GenerateViewId();
                Pages.Add(page, Id);
            }

            Id        = Pages[page];
            this.Page = page;
            this.NavigationPageHandler = navigationPageHandler;
        }
Example #3
0
 public ControlsNavigationController(NavigationPageHandler handler, Type navigationBarType, Type toolbarType)
     : base(navigationBarType, toolbarType)
 {
     Delegate = new NavDelegate(this);
     _handler = handler;
 }
Example #4
0
 public ControlsNavigationController(NavigationPageHandler handler) : base()
 {
     Delegate = new NavDelegate(this);
     _handler = handler;
 }