//protected override void OnViewControlsCreated() //{ // base.OnViewControlsCreated(); // // Access and customize the target View control. // //b4 // customHandlePrintReport = Frame.GetController<CustomHandlePrintReport_ViewController>(); // if (customHandlePrintReport != null) // {//bi lap // customHandlePrintReport.CustomHandlePrintReport += customHandlePrintReport_CustomHandlePrintReport; // } //} protected override void OnViewControllersActivated() { customHandlePrintReport = Frame.GetController <CustomHandlePrintReport_ViewController>(); if (customHandlePrintReport != null) {//bi lap customHandlePrintReport.CustomHandlePrintReport += customHandlePrintReport_CustomHandlePrintReport; } base.OnViewControllersActivated(); }
protected override void OnDeactivated() { if (customHandlePrintReport != null) { customHandlePrintReport.CustomHandlePrintReport -= customHandlePrintReport_CustomHandlePrintReport; customHandlePrintReport = null; } // Unsubscribe from previously subscribed events and release other references and resources. base.OnDeactivated(); }