コード例 #1
0
        Task DisplayWelcomeView()
        {
            if (Settings.ShouldShowWelcomeView && _mainLayout != null)
            {
                _welcomeView = new WelcomeView();

                return(Device.InvokeOnMainThreadAsync(() =>
                {
                    _mainLayout.Children.Add(_welcomeView,
                                             Constraint.Constant(0),
                                             Constraint.Constant(0));

                    return _welcomeView.ShowView();
                }));
            }

            return(Task.CompletedTask);
        }
コード例 #2
0
        void DisplayWelcomeView()
        {
            if (!(Settings.ShouldShowWelcomeView))
            {
                return;
            }

            Device.BeginInvokeOnMainThread(() =>
            {
                _welcomeView = new WelcomeView();

                _mainLayout?.Children?.Add(_welcomeView,
                                           Constraint.Constant(0),
                                           Constraint.Constant(0));

                _welcomeView?.ShowView(true);
            });
        }