Пример #1
0
        internal int IndexOfRow(TableViewCellsPresenter cp)
        {
            if (RowsPresenter != null)
            {
                return(RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp));
            }

            return(-1);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 protected override DependencyObject GetContainerForItemOverride()
 {
     var container = new TableViewCellsPresenter();
     return container;
 }
Пример #5
0
        internal int IndexOfRow(TableViewCellsPresenter cp)
        {
            if (RowsPresenter != null)
            {
                return RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp);
            }

            return -1;
        }
Пример #6
0
 internal void FocusedRowChanged(TableViewCellsPresenter cp)
 {
     FocusedRowIndex = IndexOfRow(cp);
     SelectedRowIndex = FocusedRowIndex;
 }
Пример #7
0
        protected override DependencyObject GetContainerForItemOverride()
        {
            var container = new TableViewCellsPresenter();

            return(container);
        }
Пример #8
0
 internal void FocusedRowChanged(TableViewCellsPresenter cp)
 {
     FocusedRowIndex  = IndexOfRow(cp);
     SelectedRowIndex = FocusedRowIndex;
 }