Ejemplo n.º 1
0
        public override void SetupBindings()
        {
            try
            {
                _bindings.Add(this.SetBinding(() => Vm.SearchLocation, () => LocationText.Text, BindingMode.TwoWay));
                _bindings.Add(this.SetBinding(() => Vm.CurrentWeather.Description, () => DescriptionText.Text));
                _bindings.Add(this.SetBinding(() => Vm.CurrentWeather.Temp, () => TempText.Text));
                IconImage.SetImage(new NSUrl(Vm.CurrentWeather.Icon), UIImage.FromBundle("01d.png"));

                _source = Vm.Forecasts.GetTableViewSource(BindForecastCell, ReuseId);
                ForecastsTableView.RegisterClassForCellReuse(typeof(UITableViewCell), new NSString(ReuseId));
                ForecastsTableView.Source = _source;
            }
            catch (Exception)
            {
            }
        }