Example #1
0
 internal Platform(FormsApplication context)
 {
     Forms.Context.MainWindow.BackButtonPressed += (o, e) =>
     {
         bool handled = false;
         if (_navModel.CurrentPage != null)
         {
             if (CurrentModalNavigationTask != null && !CurrentModalNavigationTask.IsCompleted)
             {
                 handled = true;
             }
             else
             {
                 handled = _navModel.CurrentPage.SendBackButtonPressed();
             }
         }
         if (!handled)
         {
             context.Exit();
         }
     };
     _naviframe = new Naviframe(Forms.Context.MainWindow)
     {
         PreserveContentOnPop     = true,
         DefaultBackButtonEnabled = false,
     };
     _naviframe.SetAlignment(-1, -1);
     _naviframe.SetWeight(1.0, 1.0);
     _naviframe.Show();
     _naviframe.AnimationFinished += NaviAnimationFinished;
     Forms.Context.BaseLayout.SetContent(_naviframe);
 }
Example #2
0
#pragma warning restore 0067

        internal DefaultPlatform(EvasObject parent)
        {
            Forms.NativeParent = parent;
            _pageBusyCount     = 0;
            MessagingCenter.Subscribe <Page, bool>(this, Page.BusySetSignalName, BusySetSignalNameHandler);
            MessagingCenter.Subscribe <Page, AlertArguments>(this, Page.AlertSignalName, AlertSignalNameHandler);
            MessagingCenter.Subscribe <Page, ActionSheetArguments>(this, Page.ActionSheetSignalName, ActionSheetSignalNameHandler);

            _internalNaviframe = new Naviframe(Forms.NativeParent)
            {
                PreserveContentOnPop     = true,
                DefaultBackButtonEnabled = false,
            };
            _internalNaviframe.SetAlignment(-1, -1);
            _internalNaviframe.SetWeight(1.0, 1.0);
            _internalNaviframe.Show();
            _internalNaviframe.AnimationFinished += NaviAnimationFinished;
        }
Example #3
0
#pragma warning restore 0067

        internal DefaultPlatform(EvasObject parent)
        {
            System.Maui.Maui.NativeParent = parent;

            _internalNaviframe = new Naviframe(System.Maui.Maui.NativeParent)
            {
                PreserveContentOnPop     = true,
                DefaultBackButtonEnabled = false,
            };
            _internalNaviframe.SetAlignment(-1, -1);
            _internalNaviframe.SetWeight(1.0, 1.0);
            _internalNaviframe.Show();
            _internalNaviframe.AnimationFinished += NaviAnimationFinished;

            if (System.Maui.Maui.UseMessagingCenter)
            {
                _popupManager = new PopupManager(this);
            }
        }