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)
625DataGridCell cell = this.OwningCell; 848private DataGridCell OwningCell 862DataGridCell 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)
1763DataGridCell cell = GetCellNearMouse(); 2096DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2127DataGridCell cell = CurrentCellContainer; 2292private DataGridCell GetEventCellOrCurrentCell(RoutedEventArgs e) 2296return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<DataGridCell>(source); 2301DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2343DataGridCell cell = CurrentCellContainer; 2517DataGridCell cell = CurrentCellContainer; 2705DataGridCell cell = CurrentCellContainer; 2922var oldCellContainer = dataGrid._currentCellContainer; 2930DataGridCell cell = dataGrid._pendingCurrentCellContainer; 2985private void UpdateCurrentCell(DataGridCell cell, bool isFocusWithinCell) 3003internal DataGridCell CurrentCellContainer 3051DataGridCell cell = CurrentCellContainer; 3065DataGridCell cell = CurrentCellContainer; 3181DataGridCell cellContainer = CurrentCellContainer; 3237internal bool CancelEdit(DataGridCell cell) 3239DataGridCell currentCell = CurrentCellContainer; 3323private bool EndEdit(RoutedCommand command, DataGridCell cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode) 3417internal DataGridCell FocusedCell 3722private void UpdateRowEditing(DataGridCell cell) 4628ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 4631DataGridCell cell = cellTracker.Container; 4649DataGridCell cell = TryFindCell(cellInfo); 4707internal void CellIsSelectedChanged(DataGridCell cell, bool isSelected) 4729internal void HandleSelectionForCellInput(DataGridCell cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect) 5485DataGridCell cell = TryFindCell(info, column); 5578DataGridCell currentCellContainer = CurrentCellContainer; 5846DataGridCell nextCellContainer = TryFindCell(nextInfo, nextColumn); 5912DataGridCell currentCellContainer = CurrentCellContainer; 5946DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 5951DataGridCell realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column); 5977DataGridCell currentCellContainer = CurrentCellContainer; 6026private DataGridCell GetCellForSelectAndEditOnFocusMove() 6028DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 6039private void SelectAndEditOnFocusMove(KeyEventArgs e, DataGridCell oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey) 6041DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 6101DataGridCell cell = TryFindCell(info, column); 6155DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6219DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6281DataGridCell cell = MouseOverCell; 6369DataGridCell cell = null; 6374cell = sourceElement as DataGridCell; 6459private DataGridCell GetCellNearMouse() 6466DataGridCell closestCell = null; 6492ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 6495DataGridCell cell = cellTracker.Container; 6521DataGridCell cell = row.TryGetCell(DisplayIndexMap[0]); 6626private DataGridCell MouseOverCell 6631DataGridCell cell = null; 6635cell = DataGridHelper.FindVisualParent<DataGridCell>(element); 6747DataGridCell cell = TryFindCell(item, column); 6813private void EnsureCellAutomationValueHolder(DataGridCell cell) 6822private void UpdateCellAutomationValueHolder(DataGridCell cell) 6848public CellAutomationValueHolder(DataGridCell cell) 7014private DataGridCell _cell; 7029internal DataGridCell TryFindCell(DataGridCellInfo info) 7035internal DataGridCell TryFindCell(ItemInfo info, DataGridColumn column) 7048internal DataGridCell TryFindCell(object item, DataGridColumn column) 8552ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 8642private DataGridCell _currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead) 8643private DataGridCell _pendingCurrentCellContainer; // Reference to the cell container that will become the current cell 8675private 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; 213((DataGridCell)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells); 221var cell = (DataGridCell)d; 294var cell = d as DataGridCell; 436if (DataGridHelper.BindingExpressionBelongsToElement<DataGridCell>(bindingExpressionsCopy[i], this)) 459public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged))); 463((DataGridCell)sender).OnIsEditingChanged((bool)e.NewValue); 522DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly)); 531var cell = d as DataGridCell; 551DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 564DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement); 662public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged))); 666DataGridCell cell = (DataGridCell)sender; 720public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 750public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 889((DataGridCell)sender).OnAnyMouseLeftButtonDown(e); 1053DataGridCell cell = (DataGridCell)d; 1140private ContainerTracking<DataGridCell> _tracker;
System\Windows\Controls\DataGridCellInfo.cs (1)
42public DataGridCellInfo(DataGridCell cell)
System\Windows\Controls\DataGridCellsPanel.cs (2)
1077DataGridCell 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)
1353internal DataGridCell TryGetCell(int index) 1358return 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; 423ContainerTracking<DataGridCell> tracker = _cellTrackingRoot; 628internal ContainerTracking<DataGridCell> CellTrackingRoot 638private ContainerTracking<DataGridCell> _cellTrackingRoot; // Root of a linked list of active cell containers
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
142internal bool Contains(DataGridCell cell)