public static void SetIsFocusInRow(DataGridCell cell, bool value) => cell.SetValue(IsFocusInRowProperty, value);
public static void SetIsCellFocused(DataGridCell cell, bool value) => cell.SetValue(IsCellFocusedProperty, value);
private void btnBolden_Click(object sender, RoutedEventArgs e) { currentCell.SetValue(FontWeightProperty, FontWeights.Bold); }
internal static void SetCellManager(DataGridCell element, CellManager value) { element.SetValue(CellManagerProperty, value); }
public static void SetTextBoxController(DataGridCell element, bool value) { element.SetValue(TextBoxControllerProperty, value); }
private void PerformCellLayout(double leftEdge, DataGridColumnBase dataGridColumn, DataGridCell cell, bool isCellFrozen) { Debug.Assert(cell != null); Debug.Assert(this._cellsElement != null); Debug.Assert(this.OwningGrid != null); if (leftEdge < this.OwningGrid.CellsWidth) { if (isCellFrozen) { cell.Visibility = Visibility.Visible; cell.SetValue(Canvas.LeftProperty, leftEdge); cell.SetValue(Canvas.ZIndexProperty, 1); cell.Width = dataGridColumn.Width; cell.Height = this._cellsElement.Height; RectangleGeometry rg = new RectangleGeometry(); rg.Rect = new Rect(0, 0, cell.Width, cell.Height); cell.Clip = rg; } else { if (this.OwningGrid.DisplayData.FirstDisplayedScrollingCol == dataGridColumn.Index && this.OwningGrid.FirstDisplayedScrollingColumnHiddenWidth > 0 && dataGridColumn.Width <= this.OwningGrid.FirstDisplayedScrollingColumnHiddenWidth) { cell.Visibility = Visibility.Collapsed; } else { cell.Visibility = Visibility.Visible; cell.SetValue(Canvas.LeftProperty, leftEdge); cell.Width = dataGridColumn.Width; cell.Height = this._cellsElement.Height; RectangleGeometry rg = new RectangleGeometry(); if (this.OwningGrid.DisplayData.FirstDisplayedScrollingCol == dataGridColumn.Index && this.OwningGrid.FirstDisplayedScrollingColumnHiddenWidth > 0) { rg.Rect = new Rect(this.OwningGrid.FirstDisplayedScrollingColumnHiddenWidth, 0, cell.Width - this.OwningGrid.FirstDisplayedScrollingColumnHiddenWidth, cell.Height); } else { rg.Rect = new Rect(0, 0, cell.Width, cell.Height); } cell.Clip = rg; } } } else { cell.Visibility = Visibility.Collapsed; } }