1 instantiation of DataGridCell
PresentationFramework (1)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
294return new DataGridCell();
172 references to DataGridCell
Microsoft.VisualStudio.LanguageServices (2)
ChangeSignature\ChangeSignatureDialog.xaml.cs (2)
226var cell = row.FindDescendant<DataGridCell>();
PresentationFramework (170)
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
21public DataGridCellAutomationPeer(DataGridCell owner)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (3)
621DataGridCell cell = this.OwningCell; 844private DataGridCell OwningCell 858DataGridCell cell = this.OwningCell;
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (2)
236DataGridCell cell = this.OwningDataGrid.TryFindCell(item, this.OwningDataGrid.Columns[0]); 440column = (childItem as DataGridCell).Column;
System\Windows\Controls\DataGrid.cs (64)
1752DataGridCell cell = GetCellNearMouse(); 2084DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2115DataGridCell cell = CurrentCellContainer; 2277private DataGridCell GetEventCellOrCurrentCell(RoutedEventArgs e) 2281return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<DataGridCell>(source); 2286DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2328DataGridCell cell = CurrentCellContainer; 2496DataGridCell cell = CurrentCellContainer; 2681DataGridCell cell = CurrentCellContainer; 2898var oldCellContainer = dataGrid._currentCellContainer; 2906DataGridCell cell = dataGrid._pendingCurrentCellContainer; 2958private void UpdateCurrentCell(DataGridCell cell, bool isFocusWithinCell) 2976internal DataGridCell CurrentCellContainer 3024DataGridCell cell = CurrentCellContainer; 3038DataGridCell cell = CurrentCellContainer; 3151DataGridCell cellContainer = CurrentCellContainer; 3207internal bool CancelEdit(DataGridCell cell) 3209DataGridCell currentCell = CurrentCellContainer; 3293private bool EndEdit(RoutedCommand command, DataGridCell cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode) 3387internal DataGridCell FocusedCell 3692private void UpdateRowEditing(DataGridCell cell) 4589ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 4592DataGridCell cell = cellTracker.Container; 4610DataGridCell cell = TryFindCell(cellInfo); 4665internal void CellIsSelectedChanged(DataGridCell cell, bool isSelected) 4687internal void HandleSelectionForCellInput(DataGridCell cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect) 5440DataGridCell cell = TryFindCell(info, column); 5533DataGridCell currentCellContainer = CurrentCellContainer; 5801DataGridCell nextCellContainer = TryFindCell(nextInfo, nextColumn); 5867DataGridCell currentCellContainer = CurrentCellContainer; 5901DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 5906DataGridCell realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column); 5932DataGridCell currentCellContainer = CurrentCellContainer; 5978private DataGridCell GetCellForSelectAndEditOnFocusMove() 5980DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 5991private void SelectAndEditOnFocusMove(KeyEventArgs e, DataGridCell oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey) 5993DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 6053DataGridCell cell = TryFindCell(info, column); 6107DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6171DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6233DataGridCell cell = MouseOverCell; 6321DataGridCell cell = null; 6326cell = sourceElement as DataGridCell; 6411private DataGridCell GetCellNearMouse() 6418DataGridCell closestCell = null; 6444ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 6447DataGridCell cell = cellTracker.Container; 6473DataGridCell cell = row.TryGetCell(DisplayIndexMap[0]); 6578private DataGridCell MouseOverCell 6583DataGridCell cell = null; 6587cell = DataGridHelper.FindVisualParent<DataGridCell>(element); 6699DataGridCell cell = TryFindCell(item, column); 6765private void EnsureCellAutomationValueHolder(DataGridCell cell) 6774private void UpdateCellAutomationValueHolder(DataGridCell cell) 6800public CellAutomationValueHolder(DataGridCell cell) 6967private DataGridCell _cell; 6982internal DataGridCell TryFindCell(DataGridCellInfo info) 6988internal DataGridCell TryFindCell(ItemInfo info, DataGridColumn column) 7001internal DataGridCell TryFindCell(object item, DataGridColumn column) 8502ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 8592private DataGridCell _currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead) 8593private DataGridCell _pendingCurrentCellContainer; // Reference to the cell container that will become the current cell 8625private DataGridCell _focusedCell = null; // Holds the cell which has logical focus.
System\Windows\Controls\DataGridBoundColumn.cs (1)
207if (element is DataGridCell cell)
System\Windows\Controls\DataGridCell.cs (40)
28DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(typeof(DataGridCell))); 29StyleProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle)); 30ClipProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceClip))); 31KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local)); 32AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip)); 35SnapsToDevicePixelsProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange)); 37EventManager.RegisterClassHandler(typeof(DataGridCell), MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnAnyMouseLeftButtonDownThunk), true); 39IsMouseOverPropertyKey.OverrideMetadata(typeof(DataGridCell), new UIPropertyMetadata(new PropertyChangedCallback(OnVisualStatePropertyChanged))); 41EventManager.RegisterClassHandler(typeof(DataGridCell), LostFocusEvent, new RoutedEventHandler(OnAnyLostFocus), true); 42EventManager.RegisterClassHandler(typeof(DataGridCell), GotFocusEvent, new RoutedEventHandler(OnAnyGotFocus), true); 53_tracker = new ContainerTracking<DataGridCell>(this); 144internal ContainerTracking<DataGridCell> Tracker 166DependencyProperty.RegisterReadOnly("Column", typeof(DataGridColumn), typeof(DataGridCell), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnColumnChanged))); 179DataGridCell cell = sender as DataGridCell; 209((DataGridCell)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells); 217var cell = (DataGridCell)d; 290var cell = d as DataGridCell; 432if (DataGridHelper.BindingExpressionBelongsToElement<DataGridCell>(bindingExpressionsCopy[i], this)) 455public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged))); 459((DataGridCell)sender).OnIsEditingChanged((bool)e.NewValue); 518DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly)); 527var cell = d as DataGridCell; 547DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 560DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 649public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged))); 653DataGridCell cell = (DataGridCell)sender; 704public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 734public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 877((DataGridCell)sender).OnAnyMouseLeftButtonDown(e); 1035DataGridCell cell = (DataGridCell)d; 1122private ContainerTracking<DataGridCell> _tracker;
System\Windows\Controls\DataGridCellInfo.cs (1)
41public DataGridCellInfo(DataGridCell cell)
System\Windows\Controls\DataGridCellsPanel.cs (2)
1075DataGridCell cell = child as DataGridCell;
System\Windows\Controls\DataGridCheckBoxColumn.cs (4)
90protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 98protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 103private CheckBox GenerateCheckBox(bool isEditing, DataGridCell cell) 121if (element is DataGridCell cell && string.Equals(propertyName, "IsThreeState", StringComparison.Ordinal))
System\Windows\Controls\DataGridColumn.cs (4)
642DataGridCell cell = dataGridRow.TryGetCell(columnIndex); 659internal FrameworkElement BuildVisualTree(bool isEditing, object dataItem, DataGridCell cell) 674protected abstract FrameworkElement GenerateElement(DataGridCell cell, object dataItem); 679protected abstract FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem);
System\Windows\Controls\DataGridComboBoxColumn.cs (7)
408if (element is DataGridCell cell) 484protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 499protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 562DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as DataGridCell); 563DataGridHelper.CacheFlowDirection(cb, cb.Parent as DataGridCell); 579DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as DataGridCell); 580DataGridHelper.CacheFlowDirection(cb, cb.Parent as DataGridCell);
System\Windows\Controls\DataGridHelper.cs (10)
236Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers."); 300Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers."); 525DataGridCell cell = (element != null) ? element.Parent as DataGridCell : null; 544if (BindingExpressionBelongsToElement<DataGridCell>(beb, cell)) 614internal static void CacheFlowDirection(FrameworkElement element, DataGridCell cell) 626internal static void RestoreFlowDirection(FrameworkElement element, DataGridCell cell) 641DataGridCell cell = (element != null) ? element.Parent as DataGridCell : null; 660VisualTreeHelper.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
System\Windows\Controls\DataGridHyperlinkColumn.cs (6)
108if (element is DataGridCell cell && !cell.IsEditing) 159protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 184protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 245DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 257DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 280DataGridCell cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\DataGridRow.cs (2)
1315internal DataGridCell TryGetCell(int index) 1320return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as DataGridCell;
System\Windows\Controls\DataGridTemplateColumn.cs (4)
159private FrameworkElement LoadTemplateContent(bool isEditing, object dataItem, DataGridCell cell) 179protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 187protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 204if (element is DataGridCell cell)
System\Windows\Controls\DataGridTextColumn.cs (7)
78protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 95protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 120DataGridCell cell = element as DataGridCell; 218DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 230DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 265DataGridCell cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (11)
115DataGridCell cell; 160cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i); 178cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i); 277return item is DataGridCell; 304DataGridCell cell = (DataGridCell)element; 322DataGridCell cell = (DataGridCell)element; 419ContainerTracking<DataGridCell> tracker = _cellTrackingRoot; 626internal ContainerTracking<DataGridCell> CellTrackingRoot 636private ContainerTracking<DataGridCell> _cellTrackingRoot; // Root of a linked list of active cell containers
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
141internal bool Contains(DataGridCell cell)