public DetalleViewPage(PrincipalViewModel principalViewModel, Content detalle) { InitializeComponent(); UserDialogs.Instance.ShowLoading("Cargando..."); ContentModel PagcontentModel = null; Task.Run(async() => { var resultado = await principalViewModel._servicio.GetContentAsync(detalle.imdbID); PagcontentModel = resultado; Device.BeginInvokeOnMainThread(() => { if (PagcontentModel != null) { this.BindingContext = PagcontentModel; } UserDialogs.Instance.HideLoading(); }); }); }
public MainPage() { InitializeComponent(); principalViewModel = new PrincipalViewModel(); }