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