protected override void OnSetEvents(Cell cell, ITableCellViewModel model) { base.OnSetEvents(cell, model); var entryCellViewModel = model as IEntryCellViewModel; SetEvents(cell, entryCellViewModel); }
private void RemoveCell(TableSection section, ITableCellViewModel cell) { var cellView = _tableCellViewModelMap[cell]; _tableCellViewModelMap.Remove(cell); _tableCellReverseViewModelMap.Remove(cellView); section.Remove(cellView); }
private void AddCell(TableSection section, ITableCellViewModel cell, int index) { var cellView = _cellFactory.CreateCellView(cell); _tableCellViewModelMap.Add(cell, cellView); _tableCellReverseViewModelMap.Add(cellView, cell); section.Insert(index, cellView); }
public Cell CreateCellView(ITableCellViewModel arg) { if (arg == null) { throw new ArgumentNullException(nameof(arg)); } _logger.WriteDebug($"TableCellFactory: Creating cell for cell type '{arg.CellType}'..."); var factory = _container.Resolve <ICellFactory>(arg.CellType); return(factory.Create(arg)); }
protected override Cell OnCreate(ITableCellViewModel model) { var castModel = model as TModel; if (castModel == null) { throw new NotSupportedException("Cannot cast to the correct view model type."); } return(OnCreateCell(castModel)); }
private int VisibleIndexOf(ObservableCollection <ITableCellViewModel> cells, ITableCellViewModel cell) { var actualIndex = cells.Where(s => s.IsVisible).ToList(); return(actualIndex.IndexOf(cell)); }
public int CompareTo(ITableCellViewModel other) { return(0); }
protected override Cell OnCreate(ITableCellViewModel model) { return(new DatePickerCell()); }
public bool Contains(ITableCellViewModel cell) { return(Cells.Contains(cell)); }
public void Remove(ITableCellViewModel cell) { Cells.Remove(cell); }