示例#1
0
        protected override void OnDeactivated()
        {
            NotificationsDialogViewController notificationsDialogViewController = Frame.GetController <NotificationsDialogViewController>();

            if (notificationsDialogViewController != null)
            {
                notificationsDialogViewController.Dismiss.Executing -= Dismiss_Executing;
                notificationsDialogViewController.Dismiss.Executed  -= Dismiss_Executed;
            }
            // Unsubscribe from previously subscribed events and release other references and resources.
            base.OnDeactivated();
        }
示例#2
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            service = Application.Modules.FindModule <NotificationsModule>().NotificationsService;
            NotificationsDialogViewController notificationsDialogViewController =
                Frame.GetController <NotificationsDialogViewController>();

            if (service != null && notificationsDialogViewController != null)
            {
                notificationsDialogViewController.Dismiss.Executing += Dismiss_Executing;
                notificationsDialogViewController.Dismiss.Executed  += Dismiss_Executed;
            }
        }