public WebViewPage(WebViewViewModel viewModel) { InitializeComponent(); DataContext = viewModel; _viewModel = viewModel; _viewModel.Initialize(webView); }
public WebViewPage(Place place) { InitializeComponent(); BindingContext = new WebViewViewModel(place); Title = place.Label + " email form"; ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = (Color)Application.Current.Resources["PrimaryColor"]; ((NavigationPage)Application.Current.MainPage).BarTextColor = Color.White; }
public WebViewPage(AdviceArea area) { InitializeComponent(); BindingContext = new WebViewViewModel(area); Title = area.AreaName + " Web Info"; ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = (Color)Application.Current.Resources["PrimaryColor"]; ((NavigationPage)Application.Current.MainPage).BarTextColor = Color.White; }
public WebView(string WebSite) { InitializeComponent(); BindingContext = new WebViewViewModel(WebSite); var navigationPage = Application.Current.MainPage as NavigationPage; navigationPage.BarBackgroundColor = Color.Green; }
private async Task PrintAsync() { try { if (_trainingDays == null) { await _userDialog.AlertAsync(Translation.Get(TRS.IMPOSSIBLE_ACTION), Translation.Get(TRS.PRINT), Translation.Get(TRS.OK)); } else { bool withImages = await _userDialog.ConfirmAsync(Translation.Get(TRS.PRINT_WITH_IMAGES) + " ?", Translation.Get(TRS.PRINT), Translation.Get(TRS.YES), Translation.Get(TRS.NO)); var trainingDayReport = new TrainingDayReport() { UserId = this.UserId, Year = this.Year, WeekOfYear = this.WeekOfYear, DayOfWeek = this.DayOfWeek, DisplayImages = withImages, TrainingDayId = null }; var memoryStream = await ReportWebService.TrainingDayReportAsync(trainingDayReport); if (memoryStream != null) { var pdfName = Guid.NewGuid().ToString() + ".pdf"; var fileManager = Resolver.Resolve <IFileManager>(); string pdfPath = Path.Combine(AppTools.TempDirectory, pdfName); bool writeSuccess = await fileManager.WriteBinaryFileAsync(pdfPath, memoryStream); if (writeSuccess) { if (Device.OS == TargetPlatform.Android) { Resolver.Resolve <IAndroidAPI> ().OpenPdf(pdfPath); } else if (Device.OS == TargetPlatform.iOS) { await WebViewViewModel.ShowAsync(pdfPath, this); } } } } } catch (Exception except) { ILogger.Instance.Error("Unable to print trainingDay", except); } }
public WebView() { InitializeComponent(); App.PinResetFromSettingsPage = false; if (App.IsToombStoned) { this.Loaded += new RoutedEventHandler(CancelNavigationPage_Loaded); } else { WebViewViewModel objHPViewModel = new WebViewViewModel(); this.DataContext = objHPViewModel; App.IsPageHomePanorama = true; App.IsPageUpdateYourDetailsafterLogin = false; App.IsFromLoginScreen = false; } }
public WebViewPage() { InitializeComponent(); BindingContext = new WebViewViewModel(webView); }
public WebViewPage() { ViewModel = Ioc.Default.GetService <WebViewViewModel>(); InitializeComponent(); ViewModel.Initialize(webView); }
public MazeMapPage(WebViewViewModel viewModel) { InitializeComponent(); BindingContext = viewModel; Browser.Source = viewModel.MazeUrl(); }
public WebViewPage(WebViewViewModel baseViewModel) : base(baseViewModel) { InitializeComponent(); }