Exemplo n.º 1
0
        public Task NotifyFullScreenEntered()
        {
            if (FullScreenEntered != null)
            {
                return(FullScreenEntered.Invoke());
            }

            return(Task.CompletedTask);
        }
        public bool TryEnterFullScreen()
        {
            var configuration = _appWindow.Presenter.GetConfiguration();

            if (_appWindow.Presenter.RequestPresentation(AppWindowPresentationKind.FullScreen))
            {
                FullScreenEntered?.Invoke(this, null);

                _ = Task.Run(async() =>
                {
                    await Task.Delay(500);
                    await UIThread.RunAsync(() =>
                    {
                        _appWindow.Changed += AppWindow_Changed;
                    });
                });

                return(true);
            }

            return(false);
        }