Ejemplo n.º 1
0
        void InternalSetPage(Page page)
        {
            if (!System.Maui.Maui.IsInitialized)
            {
                throw new InvalidOperationException("Call System.Maui.Maui.Init(Activity, Bundle) before this");
            }

            if (Platform != null)
            {
                Platform.SetPage(page);
                return;
            }

            PopupManager.ResetBusyCount(this);

            Platform = new Platform(this);

            if (_application != null)
            {
#pragma warning disable CS0618 // Type or member is obsolete
                // The Platform property is no longer necessary, but we have to set it because some third-party
                // library might still be retrieving it and using it
                _application.Platform = Platform;
#pragma warning restore CS0618 // Type or member is obsolete
            }

            Platform.SetPage(page);
            _layout.AddView(Platform.GetViewGroup());
        }
Ejemplo n.º 2
0
        void InternalSetPage(Page page)
        {
            if (!System.Maui.Maui.IsInitialized)
            {
                throw new InvalidOperationException("Call System.Maui.Maui.Init(Activity, Bundle) before this");
            }

            if (Platform != null)
            {
                Platform.SetPage(page);
                return;
            }

            PopupManager.ResetBusyCount(this);

            Platform = new AppCompat.Platform(this);
            Platform.SetPage(page);
            _layout.AddView(Platform);
            _layout.BringToFront();
        }