public MainView() { try { InitializeComponent(); } catch(Exception e) { Debug.WriteLine(e); } BindingContext = new MainViewModel() { IsBusy = true }; PopulateProspects(); PopulateContacts(); }
private void CreateCustomCell(Prospect prospect, int i, MainViewModel vm) { this.Prospects.Children.Add( new TableView { HasUnevenRows = true, BackgroundColor = Color.Transparent, // Xamarin.Forms.Color.FromHex("8fc1d0"), Opacity = 70.0, VerticalOptions = LayoutOptions.CenterAndExpand, HeightRequest = (Device.OS == TargetPlatform.iOS) ? this.Height * 1.25 / 10 : this.Height * 2.5 / 10, Root = new TableRoot { new TableSection { new ProspectCustomCell( new Label {Text = prospect.Name}, i, vm.Prospects.Count, this,prospect) } } } ); }