BuildIt.Lifecycle.WindowManager.Current_Activated C# (CSharp) Method

Current_Activated() private method

private Current_Activated ( object sender, WindowActivatedEventArgs e ) : void
sender object
e Windows.UI.Core.WindowActivatedEventArgs
return void
        private void Current_Activated(object sender, WindowActivatedEventArgs e)
        {
            
            var win = sender as Window;
//#if WINDOWS_PHONE_APP
//             if (e. != CoreWindowActivationState.Deactivated)
//                {
//                    Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
//                }
//                else
//                {
//                    Windows.Phone.UI.Input.HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
//                }
//# el
#if WINDOWS_UWP
            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                if (e.WindowActivationState != CoreWindowActivationState.Deactivated)
                {
                    Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
                }
                else
                {
                    Windows.Phone.UI.Input.HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
                }
            }

            if (e.WindowActivationState != CoreWindowActivationState.Deactivated)
            {
                SubscribeToBackRequestedEvent();
            }
            else
            {
                UnsubscribeFromBackRequestedEvent();
            }
#endif
        }