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)
1755DataGridCell cell = GetCellNearMouse(); 2090DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2121DataGridCell cell = CurrentCellContainer; 2283private DataGridCell GetEventCellOrCurrentCell(RoutedEventArgs e) 2287return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<DataGridCell>(source); 2292DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2334DataGridCell cell = CurrentCellContainer; 2502DataGridCell cell = CurrentCellContainer; 2687DataGridCell cell = CurrentCellContainer; 2904var oldCellContainer = dataGrid._currentCellContainer; 2912DataGridCell cell = dataGrid._pendingCurrentCellContainer; 2964private void UpdateCurrentCell(DataGridCell cell, bool isFocusWithinCell) 2982internal DataGridCell CurrentCellContainer 3030DataGridCell cell = CurrentCellContainer; 3044DataGridCell cell = CurrentCellContainer; 3157DataGridCell cellContainer = CurrentCellContainer; 3213internal bool CancelEdit(DataGridCell cell) 3215DataGridCell currentCell = CurrentCellContainer; 3299private bool EndEdit(RoutedCommand command, DataGridCell cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode) 3393internal DataGridCell FocusedCell 3698private void UpdateRowEditing(DataGridCell cell) 4595ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 4598DataGridCell cell = cellTracker.Container; 4616DataGridCell cell = TryFindCell(cellInfo); 4671internal void CellIsSelectedChanged(DataGridCell cell, bool isSelected) 4693internal void HandleSelectionForCellInput(DataGridCell cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect) 5446DataGridCell cell = TryFindCell(info, column); 5539DataGridCell currentCellContainer = CurrentCellContainer; 5807DataGridCell nextCellContainer = TryFindCell(nextInfo, nextColumn); 5873DataGridCell currentCellContainer = CurrentCellContainer; 5907DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 5912DataGridCell realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column); 5938DataGridCell currentCellContainer = CurrentCellContainer; 5984private DataGridCell GetCellForSelectAndEditOnFocusMove() 5986DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 5997private void SelectAndEditOnFocusMove(KeyEventArgs e, DataGridCell oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey) 5999DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 6059DataGridCell cell = TryFindCell(info, column); 6113DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6177DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6239DataGridCell cell = MouseOverCell; 6327DataGridCell cell = null; 6332cell = sourceElement as DataGridCell; 6417private DataGridCell GetCellNearMouse() 6424DataGridCell closestCell = null; 6450ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 6453DataGridCell cell = cellTracker.Container; 6479DataGridCell cell = row.TryGetCell(DisplayIndexMap[0]); 6584private DataGridCell MouseOverCell 6589DataGridCell cell = null; 6593cell = DataGridHelper.FindVisualParent<DataGridCell>(element); 6705DataGridCell cell = TryFindCell(item, column); 6771private void EnsureCellAutomationValueHolder(DataGridCell cell) 6780private void UpdateCellAutomationValueHolder(DataGridCell cell) 6806public CellAutomationValueHolder(DataGridCell cell) 6973private DataGridCell _cell; 6988internal DataGridCell TryFindCell(DataGridCellInfo info) 6994internal DataGridCell TryFindCell(ItemInfo info, DataGridColumn column) 7007internal DataGridCell TryFindCell(object item, DataGridColumn column) 8508ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 8598private DataGridCell _currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead) 8599private DataGridCell _pendingCurrentCellContainer; // Reference to the cell container that will become the current cell 8631private 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); 652public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(DataGridCell), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged))); 656DataGridCell cell = (DataGridCell)sender; 707public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 737public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DataGridCell)); 880((DataGridCell)sender).OnAnyMouseLeftButtonDown(e); 1038DataGridCell cell = (DataGridCell)d; 1125private 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) 162protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) 187protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) 248DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 260DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null); 283DataGridCell cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\DataGridRow.cs (2)
1321internal DataGridCell TryGetCell(int index) 1326return 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)