1 instantiation of DataGridCell
PresentationFramework (1)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
294return new DataGridCell();
174 references to DataGridCell
Microsoft.VisualStudio.LanguageServices (2)
ChangeSignature\ChangeSignatureDialog.xaml.cs (2)
226var cell = row.FindDescendant<DataGridCell>();
Microsoft.VisualStudio.LanguageServices.Implementation (2)
Options\Style\NamingPreferences\NamingStyleOptionPageControl.xaml.cs (2)
132var 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(); 2078DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2109DataGridCell cell = CurrentCellContainer; 2271private DataGridCell GetEventCellOrCurrentCell(RoutedEventArgs e) 2275return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<DataGridCell>(source); 2280DataGridCell cellContainer = GetEventCellOrCurrentCell(e); 2322DataGridCell cell = CurrentCellContainer; 2490DataGridCell cell = CurrentCellContainer; 2675DataGridCell cell = CurrentCellContainer; 2892var oldCellContainer = dataGrid._currentCellContainer; 2900DataGridCell cell = dataGrid._pendingCurrentCellContainer; 2952private void UpdateCurrentCell(DataGridCell cell, bool isFocusWithinCell) 2970internal DataGridCell CurrentCellContainer 3018DataGridCell cell = CurrentCellContainer; 3032DataGridCell cell = CurrentCellContainer; 3145DataGridCell cellContainer = CurrentCellContainer; 3201internal bool CancelEdit(DataGridCell cell) 3203DataGridCell currentCell = CurrentCellContainer; 3287private bool EndEdit(RoutedCommand command, DataGridCell cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode) 3381internal DataGridCell FocusedCell 3686private void UpdateRowEditing(DataGridCell cell) 4583ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 4586DataGridCell cell = cellTracker.Container; 4604DataGridCell cell = TryFindCell(cellInfo); 4659internal void CellIsSelectedChanged(DataGridCell cell, bool isSelected) 4681internal void HandleSelectionForCellInput(DataGridCell cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect) 5434DataGridCell cell = TryFindCell(info, column); 5527DataGridCell currentCellContainer = CurrentCellContainer; 5795DataGridCell nextCellContainer = TryFindCell(nextInfo, nextColumn); 5861DataGridCell currentCellContainer = CurrentCellContainer; 5895DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 5900DataGridCell realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column); 5926DataGridCell currentCellContainer = CurrentCellContainer; 5972private DataGridCell GetCellForSelectAndEditOnFocusMove() 5974DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 5985private void SelectAndEditOnFocusMove(KeyEventArgs e, DataGridCell oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey) 5987DataGridCell newCell = GetCellForSelectAndEditOnFocusMove(); 6047DataGridCell cell = TryFindCell(info, column); 6101DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6165DataGridCell cell = TryFindCell(targetInfo, currentColumn); 6227DataGridCell cell = MouseOverCell; 6315DataGridCell cell = null; 6320cell = sourceElement as DataGridCell; 6405private DataGridCell GetCellNearMouse() 6412DataGridCell closestCell = null; 6438ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 6441DataGridCell cell = cellTracker.Container; 6467DataGridCell cell = row.TryGetCell(DisplayIndexMap[0]); 6572private DataGridCell MouseOverCell 6577DataGridCell cell = null; 6581cell = DataGridHelper.FindVisualParent<DataGridCell>(element); 6693DataGridCell cell = TryFindCell(item, column); 6759private void EnsureCellAutomationValueHolder(DataGridCell cell) 6768private void UpdateCellAutomationValueHolder(DataGridCell cell) 6794public CellAutomationValueHolder(DataGridCell cell) 6961private DataGridCell _cell; 6976internal DataGridCell TryFindCell(DataGridCellInfo info) 6982internal DataGridCell TryFindCell(ItemInfo info, DataGridColumn column) 6995internal DataGridCell TryFindCell(object item, DataGridColumn column) 8496ContainerTracking<DataGridCell> cellTracker = cellsPresenter.CellTrackingRoot; 8586private DataGridCell _currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead) 8587private DataGridCell _pendingCurrentCellContainer; // Reference to the cell container that will become the current cell 8619private 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)
1069DataGridCell 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)