Пример #1
0
    protected override void OnIsItemsHostChanged(bool oldIsItemsHost, bool newIsItemsHost)
    {
      base.OnIsItemsHostChanged(oldIsItemsHost, newIsItemsHost);

      var rowPresenter = TableViewUtils.FindParent<TableViewCellsPresenter>(this);

      if (rowPresenter != null)
      {
        rowPresenter.CellsPanel = this;
        ParentTableView = rowPresenter.ParentTableView;
        this.Style = ParentTableView.CellsPanelStyle;
      }
    }
        public void PrepareRow(TableView parent, object dataItem)
        {
            ParentTableView = parent;

              Focusable = ParentTableView.CellNavigation == false;

              Item = dataItem;

              // set the selected state for this row
              var scp = ParentTableView.SelectedCellsPresenter;
              if (scp != null)
            IsSelected = ParentTableView.IndexOfRow(scp) == ParentTableView.IndexOfRow(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;
                this.Width = column.Width;
                BindingOperations.ClearBinding(this, WidthProperty);
                BindingOperations.SetBinding(this, WidthProperty, column.WidthBinding);
                Focusable = ParentTableView.CellNavigation;
            }
            column.GenerateCellContent(this);
        }