internal int IndexOfRow(TableViewCellsPresenter cp) { if (RowsPresenter != null) { return(RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp)); } return(-1); }
public void PrepareRow(TableView parent, object dataItem) { ParentTableView = parent; Focusable = ParentTableView.CellNavigation == false; Item = dataItem; // set the selected state for this row TableViewCellsPresenter scp = ParentTableView.SelectedCellsPresenter; if (scp != null) { IsSelected = ParentTableView.IndexOfRow(scp) == ParentTableView.IndexOfRow(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; this.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; this.Width = column.Width; BindingOperations.ClearBinding(this, WidthProperty); BindingOperations.SetBinding(this, WidthProperty, column.WidthBinding); Focusable = ParentTableView.CellNavigation; } column.GenerateCellContent(this); }
internal void FocusedRowChanged(TableViewCellsPresenter cp) { FocusedRowIndex = IndexOfRow(cp); SelectedRowIndex = FocusedRowIndex; }
internal int IndexOfRow(TableViewCellsPresenter cp) { if (RowsPresenter != null) return RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp); return -1; }
protected override DependencyObject GetContainerForItemOverride() { var container = new TableViewCellsPresenter(); return(container); }
internal void FocusedRowChanged(TableViewCellsPresenter cp) { FocusedRowIndex = IndexOfRow(cp); SelectedRowIndex = FocusedRowIndex; }
protected override DependencyObject GetContainerForItemOverride() { var container = new TableViewCellsPresenter(); return container; }