Exemplo n.º 1
0
        public void SendAppearing()
        {
            if (_hasAppeared)
            {
                return;
            }

            _hasAppeared = true;

            if (IsBusy)
            {
                if (IsPlatformEnabled)
                {
                    MessagingCenter.Send(this, BusySetSignalName, true);
                }
                else
                {
                    _pendingActions.Add(() => MessagingCenter.Send(this, BusySetSignalName, true));
                }
            }

            OnAppearing();
            Appearing?.Invoke(this, EventArgs.Empty);

            var pageContainer = this as IPageContainer <Page>;

            pageContainer?.CurrentPage?.SendAppearing();

            FindApplication(this)?.OnPageAppearing(this);
        }
Exemplo n.º 2
0
 private void AppearPropertyChanged(bool oldValue, bool newValue)
 {
     if (!oldValue && newValue && IsVisible)
     {
         MakeAppear(this);
         Appearing?.Invoke();
     }
     else if (oldValue && !newValue && IsVisible)
     {
         MakeDisappear(this);
         Disappearing?.Invoke();
     }
 }
Exemplo n.º 3
0
        public void SendAppearing()
        {
            // Only fire appearing if the page has been added to the windows
            // Visual Hierarchy
            // The window/application will take care of re-firing this appearing
            // if it needs to
            var window = this.FindParentOfType <Window>();

            if (window?.Parent == null)
            {
                return;
            }

            if (_hasAppeared)
            {
                return;
            }

            _hasAppeared = true;

            if (IsBusy)
            {
                if (IsPlatformEnabled)
                {
                    MessagingCenter.Send(this, BusySetSignalName, true);
                }
                else
                {
                    _pendingActions.Add(() => MessagingCenter.Send(this, BusySetSignalName, true));
                }
            }

            OnAppearing();
            Appearing?.Invoke(this, EventArgs.Empty);

            var pageContainer = this as IPageContainer <Page>;

            pageContainer?.CurrentPage?.SendAppearing();

            FindApplication(this)?.OnPageAppearing(this);
        }
Exemplo n.º 4
0
Arquivo: Page.cs Projeto: yl33/TizenFX
        public void SendAppearing()
        {
            if (_hasAppeared)
            {
                return;
            }

            _hasAppeared = true;

            if (IsBusy)
            {
                MessagingCenter.Send(this, BusySetSignalName, true);
            }

            OnAppearing();
            Appearing?.Invoke(this, EventArgs.Empty);

            var pageContainer = this as IPageContainer <Page>;

            pageContainer?.CurrentPage?.SendAppearing();
        }
Exemplo n.º 5
0
 protected virtual void OnAppearing()
 => Appearing?.Invoke(this, EventArgs.Empty);
Exemplo n.º 6
0
 internal void InvokeAppearing()
 {
     Appearing?.Invoke(this, new PageAppearingEventArgs());
 }
Exemplo n.º 7
0
 public override void RunPresentationAnimation()
 {
     base.RunPresentationAnimation();
     Appearing?.Invoke();
 }
Exemplo n.º 8
0
            public override void ViewDidAppear(bool animated)
            {
                base.ViewDidAppear(animated);

                Appearing?.Invoke(this, EventArgs.Empty);
            }