/// <inheritdoc/> public override void ShowInView(IHtmlView htmlView, KeyValueList <string, string> variables) { base.ShowInView(htmlView, variables); _viewModel = new FirstTimeSyncViewModel( Ioc.GetOrCreate <INavigationService>(), Ioc.GetOrCreate <ILanguageService>(), Ioc.GetOrCreate <ISvgIconService>(), Ioc.GetOrCreate <IBaseUrlService>(), Ioc.GetOrCreate <IStoryBoardService>()); Bindings.BindCommand("GoBack", _viewModel.GoBackCommand); Bindings.BindCommand("Continue", _viewModel.ContinueCommand); string html = _viewService.GenerateHtml(_viewModel); View.LoadHtml(html); }
/// <inheritdoc/> public override void ShowInView(IHtmlView htmlView, KeyValueList <string, string> variables, Navigation redirectedFrom) { base.ShowInView(htmlView, variables, redirectedFrom); _viewModel = new FirstTimeSyncViewModel( Ioc.GetOrCreate <INavigationService>(), Ioc.GetOrCreate <ILanguageService>(), Ioc.GetOrCreate <ISvgIconService>(), Ioc.GetOrCreate <IThemeService>(), Ioc.GetOrCreate <IBaseUrlService>(), Ioc.GetOrCreate <IStoryBoardService>()); VueBindingShortcut[] shortcuts = new[] { new VueBindingShortcut(VueBindingShortcut.KeyEscape, nameof(FirstTimeSyncViewModel.GoBackCommand)), new VueBindingShortcut(VueBindingShortcut.KeyEnter, nameof(FirstTimeSyncViewModel.ContinueCommand)), }; VueBindings = new VueDataBinding(_viewModel, View, shortcuts); _viewModel.VueDataBindingScript = VueBindings.BuildVueScript(); VueBindings.StartListening(); string html = _viewService.GenerateHtml(_viewModel); View.LoadHtml(html); }