public BonosView() { manager = new BonosManager(); this.Appearing += async(object sender, EventArgs e) => { await refreshData(); }; InitializeComponent(); //Toolbar Items ToolbarItems.Add(new IconToolbarItem { Icon = "fa-plus", IconColor = Color.White, Command = new Command(this.addBono) }); }
public BonosMasterDetail() { manager = new BonosManager(); bonos = new ObservableCollection <Bono>(); refresh(); InitializeComponent(); Label header = new Label { Text = "MasterDetailPage", FontSize = 30, FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center }; // Create ListView for the master page. ListView listView = new ListView { ItemsSource = bonos }; // Create the master page with the ListView. this.Master = new ContentPage { Title = "Color List", // Title required! Content = new StackLayout { Children = { header, listView } } }; BonoDetail detail = new BonoDetail(); this.Detail = detail; }