public ListItemYearView(ViewGroup root, ViewItemYear year) : base(Resource.Layout.ListItemYear, root) { DataContext = year; Year = year; FindViewById <Button>(Resource.Id.ButtonAddSemester).Click += delegate { OnAddSemesterRequested?.Invoke(this, new EventArgs()); }; FindViewById <View>(Resource.Id.YearName).Click += delegate { OnEditRequested?.Invoke(this, new EventArgs()); }; _itemsWrapperSemester = new ItemsControlWrapper(FindViewById <ViewGroup>(Resource.Id.ViewGroupSemesters)) { ItemsSource = year.Semesters, ItemTemplate = new CustomDataTemplate <ViewItemSemester>(CreateSemester) }; }
private void EditButton_Click(object sender, EventArgs e) { OnEditRequested?.Invoke(this, e); }