1 instantiation of DataGridCell
PresentationFramework (1)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
295return 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)
22public DataGridCellAutomationPeer(DataGridCell owner)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (3)
622DataGridCell cell = this.OwningCell; 845private DataGridCell OwningCell 859DataGridCell cell = this.OwningCell;
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (2)
237DataGridCell cell = this.OwningDataGrid.TryFindCell(item, this.OwningDataGrid.Columns[0]); 441column = (childItem as DataGridCell).Column;
System\Windows\Controls\DataGrid.cs (64)
1756DataGridCell cell = GetCellNearMouse(); 2091DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2122DataGridCell cell = CurrentCellContainer; 2284private DataGridCell GetEventCellOrCurrentCell(RoutedEventArgs e) 2288return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<DataGridCell>(source); 2293DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2335DataGridCell cell = CurrentCellContainer; 2503DataGridCell cell = CurrentCellContainer; 2688DataGridCell cell = CurrentCellContainer; 2905var oldCellContainer = dataGrid._currentCellContainer; 2913DataGridCell cell = dataGrid._pendingCurrentCellContainer; 2965private void UpdateCurrentCell(DataGridCell cell, bool isFocusWithinCell) 2983internal DataGridCell CurrentCellContainer 3031DataGridCell cell = CurrentCellContainer; 3045DataGridCell cell = CurrentCellContainer; 3158DataGridCell cellContainer = CurrentCellContainer; 3214internal bool CancelEdit(DataGridCell cell) 3216DataGridCell currentCell = CurrentCellContainer; 3300private bool EndEdit(RoutedCommand command, DataGridCell cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode) 3394internal DataGridCell FocusedCell 3699private void UpdateRowEditing(DataGridCell cell) 4596ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 4599DataGridCell cell = cellTracker.Container; 4617DataGridCell cell = TryFindCell(cellInfo); 4672internal void CellIsSelectedChanged(DataGridCell cell, bool isSelected) 4694internal void HandleSelectionForCellInput(DataGridCell cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect) 5447DataGridCell cell = TryFindCell(info, column); 5540DataGridCell currentCellContainer = CurrentCellContainer; 5808DataGridCell nextCellContainer = TryFindCell(nextInfo, nextColumn); 5874DataGridCell currentCellContainer = CurrentCellContainer; 5908DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 5913DataGridCell realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column); 5939DataGridCell currentCellContainer = CurrentCellContainer; 5985private DataGridCell GetCellForSelectAndEditOnFocusMove() 5987DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 5998private void SelectAndEditOnFocusMove(KeyEventArgs e, DataGridCell oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey) 6000DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 6060DataGridCell cell = TryFindCell(info, column); 6114DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6178DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6240DataGridCell cell = MouseOverCell; 6328DataGridCell cell = null; 6333cell = sourceElement as DataGridCell; 6418private DataGridCell GetCellNearMouse() 6425DataGridCell closestCell = null; 6451ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 6454DataGridCell cell = cellTracker.Container; 6480DataGridCell cell = row.TryGetCell(DisplayIndexMap[0]); 6585private DataGridCell MouseOverCell 6590DataGridCell cell = null; 6594cell = DataGridHelper.FindVisualParent<DataGridCell>(element); 6706DataGridCell cell = TryFindCell(item, column); 6772private void EnsureCellAutomationValueHolder(DataGridCell cell) 6781private void UpdateCellAutomationValueHolder(DataGridCell cell) 6807public CellAutomationValueHolder(DataGridCell cell) 6974private DataGridCell _cell; 6989internal DataGridCell TryFindCell(DataGridCellInfo info) 6995internal DataGridCell TryFindCell(ItemInfo info, DataGridColumn column) 7008internal DataGridCell TryFindCell(object item, DataGridColumn column) 8509ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 8599private DataGridCell _currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead) 8600private DataGridCell _pendingCurrentCellContainer; // Reference to the cell container that will become the current cell 8632private DataGridCell _focusedCell = null; // Holds the cell which has logical focus.
System\Windows\Controls\DataGridBoundColumn.cs (1)
208if (element is DataGridCell cell)
System\Windows\Controls\DataGridCell.cs (40)
29DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(typeof(DataGridCell))); 30StyleProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle)); 31ClipProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceClip))); 32KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local)); 33AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip)); 36SnapsToDevicePixelsProperty.OverrideMetadata(typeof(DataGridCell), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange)); 38EventManager.RegisterClassHandler(typeof(DataGridCell), MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnAnyMouseLeftButtonDownThunk), true); 40IsMouseOverPropertyKey.OverrideMetadata(typeof(DataGridCell), new UIPropertyMetadata(new PropertyChangedCallback(OnVisualStatePropertyChanged))); 42EventManager.RegisterClassHandler(typeof(DataGridCell), LostFocusEvent, new RoutedEventHandler(OnAnyLostFocus), true); 43EventManager.RegisterClassHandler(typeof(DataGridCell), GotFocusEvent, new RoutedEventHandler(OnAnyGotFocus), true); 54_tracker = new ContainerTracking<DataGridCell>(this); 145internal ContainerTracking<DataGridCell> Tracker 167DependencyProperty.RegisterReadOnly("Column", typeof(DataGridColumn), typeof(DataGridCell), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnColumnChanged))); 180DataGridCell cell = sender as DataGridCell; 210((DataGridCell)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells); 218var cell = (DataGridCell)d; 291var cell = d as DataGridCell; 433if (DataGridHelper.BindingExpressionBelongsToElement<DataGridCell>(bindingExpressionsCopy[i], this)) 456public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged))); 460((DataGridCell)sender).OnIsEditingChanged((bool)e.NewValue); 519DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly)); 528var cell = d as DataGridCell; 548DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 561DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 653public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged))); 657DataGridCell cell = (DataGridCell)sender; 708public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 738public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 881((DataGridCell)sender).OnAnyMouseLeftButtonDown(e); 1039DataGridCell cell = (DataGridCell)d; 1126private ContainerTracking<DataGridCell> _tracker;
System\Windows\Controls\DataGridCellInfo.cs (1)
42public DataGridCellInfo(DataGridCell cell)
System\Windows\Controls\DataGridCellsPanel.cs (2)
1076DataGridCell cell = child as DataGridCell;
System\Windows\Controls\DataGridCheckBoxColumn.cs (4)
91protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 99protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 104private CheckBox GenerateCheckBox(bool isEditing, DataGridCell cell) 122if (element is DataGridCell cell && string.Equals(propertyName, "IsThreeState", StringComparison.Ordinal))
System\Windows\Controls\DataGridColumn.cs (4)
643DataGridCell cell = dataGridRow.TryGetCell(columnIndex); 660internal FrameworkElement BuildVisualTree(bool isEditing, object dataItem, DataGridCell cell) 675protected abstract FrameworkElement GenerateElement(DataGridCell cell, object dataItem); 680protected abstract FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem);
System\Windows\Controls\DataGridComboBoxColumn.cs (7)
409if (element is DataGridCell cell) 485protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 500protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 563DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as DataGridCell); 564DataGridHelper.CacheFlowDirection(cb, cb.Parent as DataGridCell); 580DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as DataGridCell); 581DataGridHelper.CacheFlowDirection(cb, cb.Parent as DataGridCell);
System\Windows\Controls\DataGridHelper.cs (10)
237Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers."); 301Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers."); 526DataGridCell cell = (element != null) ? element.Parent as DataGridCell : null; 545if (BindingExpressionBelongsToElement<DataGridCell>(beb, cell)) 615internal static void CacheFlowDirection(FrameworkElement element, DataGridCell cell) 627internal static void RestoreFlowDirection(FrameworkElement element, DataGridCell cell) 642DataGridCell cell = (element != null) ? element.Parent as DataGridCell : null; 661VisualTreeHelper.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
System\Windows\Controls\DataGridHyperlinkColumn.cs (6)
109if (element is DataGridCell cell && !cell.IsEditing) 163protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 188protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 249DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 261DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 284DataGridCell cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\DataGridRow.cs (2)
1322internal DataGridCell TryGetCell(int index) 1327return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as DataGridCell;
System\Windows\Controls\DataGridTemplateColumn.cs (4)
160private FrameworkElement LoadTemplateContent(bool isEditing, object dataItem, DataGridCell cell) 180protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 188protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 205if (element is DataGridCell cell)
System\Windows\Controls\DataGridTextColumn.cs (7)
79protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 96protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 121DataGridCell cell = element as DataGridCell; 219DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 231DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 266DataGridCell cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (11)
116DataGridCell cell; 161cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i); 179cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i); 278return item is DataGridCell; 305DataGridCell cell = (DataGridCell)element; 323DataGridCell cell = (DataGridCell)element; 420ContainerTracking<DataGridCell> tracker = _cellTrackingRoot; 627internal ContainerTracking<DataGridCell> CellTrackingRoot 637private ContainerTracking<DataGridCell> _cellTrackingRoot; // Root of a linked list of active cell containers
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
142internal bool Contains(DataGridCell cell)