public ApplicationRenderer( XForms.Application application, XamlApplication xamlApplication) { if (null == application) { throw new ArgumentNullException(nameof(application)); } if (null == xamlApplication) { throw new ArgumentNullException(nameof(xamlApplication)); } this._application = application; this._applicationDelegate = application; this._xamlApplication = xamlApplication; // Handle lifetime events if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3, 0)) { xamlApplication.EnteredBackground += Application_EnteredBackground; xamlApplication.LeavingBackground += Application_LeavingBackground; } else { xamlApplication.Suspending += Application_Suspending; xamlApplication.Resuming += Application_Resuming; } // Handle the back button var systemNavigationView = SystemNavigationManager.GetForCurrentView(); systemNavigationView.BackRequested += SystemNavigationView_BackRequested; // Handle the input pane being shown or hidden InputPane inputPane = InputPane.GetForCurrentView(); inputPane.Showing += InputPane_Showing; inputPane.Hiding += InputPane_Hiding; }
public ApplicationRenderer( XForms.Application application, AndroidApplicationActivity androidApplication) { if (null == application) { throw new ArgumentNullException(nameof(application)); } if (null == androidApplication) { throw new ArgumentNullException(nameof(androidApplication)); } this._application = application; this._applicationDelegate = application; this._androidApplication = androidApplication; androidApplication.Suspending += Application_Suspending; androidApplication.Resuming += Application_Resuming; }
//private Color? _titleBarAccentColor, _titleBarForegroundColor; public ApplicationRenderer( XForms.Application application, NativeApplicationDelegate nativeApplication) { if (null == application) { throw new ArgumentNullException(nameof(application)); } if (null == nativeApplication) { throw new ArgumentNullException(nameof(nativeApplication)); } this._application = application; this._applicationDelegate = application; this._nativeApplicationDelegate = nativeApplication; nativeApplication.Suspending += Application_Suspending; nativeApplication.Resuming += Application_Resuming; }