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(); }
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; } }