public MainWindowViewModel(Frame CurrentFrame, Dispatcher mainWindowDispatcher) { this.currentFrame = CurrentFrame; this.mainWindowDispatcher = mainWindowDispatcher; // Initialize Agle as soon as possible MyAgle = Agle.Agle.GetAgleInstance; MyAgle.InitializeAgle(this.mainWindowDispatcher); // Creating ViewModel for all related pages aglePageVM = new AglePageViewModel(); selfCheckingPageVM = new SelfCheckingPageViewModel(); titlePageVM = new TitlePageViewModel(); titlePageVM.VideoFinishedEvent += this.OnTitlePageFinished; selfCheckingPageVM.AgleSystemStart += this.OnAgleSystemStart; // Ready navigating to title page, show starting movie TitlePage titlePage = new TitlePage(); titlePage.InitializeTitlePage(this.titlePageVM); this.currentFrame.NavigationService.Navigate(titlePage); }