Esempio n. 1
0
 internal int IndexOfRow(TableViewCellsPresenter cp)
 {
     if (RowsPresenter != null)
     {
         return(RowsPresenter.ItemContainerGenerator.IndexFromContainer(cp));
     }
     return(-1);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 4
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;
                this.Width = column.Width;
                BindingOperations.ClearBinding(this, WidthProperty);
                BindingOperations.SetBinding(this, WidthProperty, column.WidthBinding);
                Focusable = ParentTableView.CellNavigation;
            }
            column.GenerateCellContent(this);
        }
Esempio n. 5
0
 internal void FocusedRowChanged(TableViewCellsPresenter cp)
 {
   FocusedRowIndex = IndexOfRow(cp);
   SelectedRowIndex = FocusedRowIndex;
 }
Esempio n. 6
0
 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);
        }
Esempio n. 8
0
 internal void FocusedRowChanged(TableViewCellsPresenter cp)
 {
     FocusedRowIndex  = IndexOfRow(cp);
     SelectedRowIndex = FocusedRowIndex;
 }
 protected override DependencyObject GetContainerForItemOverride()
 {
     var container = new TableViewCellsPresenter();
       return container;
 }