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