private void DisplayContent(API.Data.Project project) { Title = project.Title; Registered myproj = Array.Find <Registered> (project.Registered, x => x.Code == project.UserProjectCode); List <Registered> registeredStudent = new List <Registered> (project.Registered); registeredStudent.Remove(myproj); registeredStudent.Insert(0, myproj); if (!(registeredStudent.Count == 1 && registeredStudent [0] == null)) { ListView listView = new ListView { ItemTemplate = new DataTemplate(typeof(ProjectGroupCell)), Header = new FilesHeader(this, project), ItemsSource = registeredStudent, HasUnevenRows = true, VerticalOptions = LayoutOptions.FillAndExpand }; listView.ItemSelected += (sender, e) => { if (e.SelectedItem != null) { listView.SelectedItem = null; } }; Content = listView; } else { Content = new FilesHeader(this, project); } }
public Project(API.Data.Project project) { try { DisplayContent(project); } catch (Exception ex) { DisplayError(ex); } }
protected override void OnBindingContextChanged() { proj = (API.Data.Project)BindingContext; DrawCell(); base.OnBindingContextChanged(); }