public Master(FormProfile formProfile) { Title = "Forms"; InitializeComponent(); listView.ItemsSource = Database.GetMasterPageItems(); newButton.Text = Resx.App.New + " " + formProfile.FormName; }
public MasterDetail(FormProfile formProfile) { var masterPage = new Master(formProfile); var detailPage = new Detail(formProfile); Master = masterPage; Detail = new NavigationPage(detailPage); masterPage.ListView.ItemSelected += OnItemSelected; }
public App() { InitializeComponent(); var formProfile = new FormProfile( Resx.JobCards.SingularName, Resx.JobCards.PluralName, typeof(JobCard)); MainPage = new MasterDetail(formProfile); }
public Detail(FormProfile formProfile) { /* Set the command to display form actions. * Command is only executable if the form is set. */ _openOptionsCommand = new Command(async() => { var action = await DisplayActionSheet(null, Resx.App.Cancel, Resx.App.Delete, Resx.App.Duplicate, Resx.App.Export); Debug.WriteLine("Action: " + action); }, () => { return(Form != null); }); var ActionsItem = new ToolbarItem(); ActionsItem.Text = Resx.App.Options; ActionsItem.Command = _openOptionsCommand; ToolbarItems.Add(ActionsItem); InitializeComponent(); // ListView.ItemSelected += OnItemSelected; }