internal int IndexOfRow(TableViewCellsPresenter cp) { if (RowsPresenter != null) { return(RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp)); } return(-1); }
public void PrepareCell(TableViewCellsPresenter parent, int idx) { ParentCellsPresenter = parent; _parentTableView = parent.ParentTableView; var column = _parentTableView.Columns[idx]; //IsSelected = ParentCellsPresenter.IsSelected() && (ParentTableView.FocusedColumnIndex == column.ColumnIndex); if (_column != column) { _column = column; Width = column.Width; BindingOperations.ClearBinding(this, WidthProperty); BindingOperations.SetBinding(this, WidthProperty, column.WidthBinding); Focusable = _parentTableView.CellNavigation; } column.GenerateCellContent(this); }
public void PrepareCell(TableViewCellsPresenter parent, int idx) { ParentCellsPresenter = parent; _parentTableView = parent.ParentTableView; var column = _parentTableView.Columns[idx]; //IsSelected = ParentCellsPresenter.IsSelected() && (ParentTableView.FocusedColumnIndex == column.ColumnIndex); if (_column != column) { _column = column; Width = column.Width; BindingOperations.ClearBinding(this, WidthProperty); BindingOperations.SetBinding(this, WidthProperty, column.WidthBinding); Focusable = _parentTableView.CellNavigation; } column.GenerateCellContent(this); }
protected override DependencyObject GetContainerForItemOverride() { var container = new TableViewCellsPresenter(); return container; }
internal int IndexOfRow(TableViewCellsPresenter cp) { if (RowsPresenter != null) { return RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp); } return -1; }
internal void FocusedRowChanged(TableViewCellsPresenter cp) { FocusedRowIndex = IndexOfRow(cp); SelectedRowIndex = FocusedRowIndex; }
protected override DependencyObject GetContainerForItemOverride() { var container = new TableViewCellsPresenter(); return(container); }
internal void FocusedRowChanged(TableViewCellsPresenter cp) { FocusedRowIndex = IndexOfRow(cp); SelectedRowIndex = FocusedRowIndex; }