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