/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); navigatorService.RegisterAll("CodeChallengeSample.App.Views.*"); Services.Register(navigatorService); }
/// <summary> /// Constructor /// </summary> public App() { // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); //TODO: Modify the following line to automatically or manually register your Views navigatorService.RegisterAll("Views.*"); ServiceLocator.Register(navigatorService); ServiceLocator.Register<MessageboxService>(); //TODO: Modify the following line to automatically or manually register your Services ServiceLocator.RegisterAll("Services.*"); }
public App() { // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); //TODO: Modify the following line to automatically or manually register your Views navigatorService.RegisterAll("MvvmApp.WPF.Views.*"); base.Services.Register(navigatorService); base.Services.Register <MessageboxService>(); //TODO: Modify the following lines to automatically or manually register your Services base.Services.Register <SamplePlatformspecificService>(); base.Services.Register <SamplePortableService>(); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); //TODO: Modify the following line to automatically or manually register your Views navigatorService.RegisterAll("MvvmApp.UWP.Views.*"); Services.Register(navigatorService); //TODO: Modify the following lines to automatically or manually register your Services Services.Register <MessageboxService>(); Services.Register <SamplePlatformspecificService>(); Services.Register <SamplePortableService>(); }
public App() { InitializeComponent(); // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); //TODO: Modify the following line to automatically or manually register your Views navigatorService.RegisterAll("MvvmApp.XamarinForms.Views.*", typeof(App).GetTypeInfo().Assembly); Services.Register(navigatorService); //TODO: Modify the following lines to automatically or manually register your Services Services.Register <MessageboxService>(); Services.Register <SamplePlatformspecificService>(); Services.Register <SamplePortableService>(); SetStartupPage <MainPage>(); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; // MVVMbasics-specific initialization NavigatorService navigatorService = new NavigatorService(); //TODO: Modify the following line to automatically or manually register your Views navigatorService.RegisterAll("StoreApp1.Views.*"); Services.Register(navigatorService); //TODO: Modify the following lines to automatically or manually register your Services Services.Register <MessageboxService>(); Services.Register <SamplePlatformspecificService>(); Services.Register <SamplePortableService>(); }