1 instantiation of DataGridCell
PresentationFramework (1)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
294
return new
DataGridCell
();
174 references to DataGridCell
Microsoft.VisualStudio.LanguageServices (2)
ChangeSignature\ChangeSignatureDialog.xaml.cs (2)
226
var
cell = row.FindDescendant<
DataGridCell
>();
Microsoft.VisualStudio.LanguageServices.Implementation (2)
Options\Style\NamingPreferences\NamingStyleOptionPageControl.xaml.cs (2)
132
var
cell = row.FindDescendant<
DataGridCell
>();
PresentationFramework (170)
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
21
public DataGridCellAutomationPeer(
DataGridCell
owner)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (3)
621
DataGridCell
cell = this.OwningCell;
844
private
DataGridCell
OwningCell
858
DataGridCell
cell = this.OwningCell;
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (2)
236
DataGridCell
cell = this.OwningDataGrid.TryFindCell(item, this.OwningDataGrid.Columns[0]);
440
column = (childItem as
DataGridCell
).Column;
System\Windows\Controls\DataGrid.cs (64)
1752
DataGridCell
cell = GetCellNearMouse();
2078
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2109
DataGridCell
cell = CurrentCellContainer;
2271
private
DataGridCell
GetEventCellOrCurrentCell(RoutedEventArgs e)
2275
return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<
DataGridCell
>(source);
2280
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2322
DataGridCell
cell = CurrentCellContainer;
2490
DataGridCell
cell = CurrentCellContainer;
2675
DataGridCell
cell = CurrentCellContainer;
2892
var
oldCellContainer = dataGrid._currentCellContainer;
2900
DataGridCell
cell = dataGrid._pendingCurrentCellContainer;
2952
private void UpdateCurrentCell(
DataGridCell
cell, bool isFocusWithinCell)
2970
internal
DataGridCell
CurrentCellContainer
3018
DataGridCell
cell = CurrentCellContainer;
3032
DataGridCell
cell = CurrentCellContainer;
3145
DataGridCell
cellContainer = CurrentCellContainer;
3201
internal bool CancelEdit(
DataGridCell
cell)
3203
DataGridCell
currentCell = CurrentCellContainer;
3287
private bool EndEdit(RoutedCommand command,
DataGridCell
cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode)
3381
internal
DataGridCell
FocusedCell
3686
private void UpdateRowEditing(
DataGridCell
cell)
4583
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
4586
DataGridCell
cell = cellTracker.Container;
4604
DataGridCell
cell = TryFindCell(cellInfo);
4659
internal void CellIsSelectedChanged(
DataGridCell
cell, bool isSelected)
4681
internal void HandleSelectionForCellInput(
DataGridCell
cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect)
5434
DataGridCell
cell = TryFindCell(info, column);
5527
DataGridCell
currentCellContainer = CurrentCellContainer;
5795
DataGridCell
nextCellContainer = TryFindCell(nextInfo, nextColumn);
5861
DataGridCell
currentCellContainer = CurrentCellContainer;
5895
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
5900
DataGridCell
realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column);
5926
DataGridCell
currentCellContainer = CurrentCellContainer;
5972
private
DataGridCell
GetCellForSelectAndEditOnFocusMove()
5974
DataGridCell
newCell = Keyboard.FocusedElement as
DataGridCell
;
5985
private void SelectAndEditOnFocusMove(KeyEventArgs e,
DataGridCell
oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey)
5987
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
6047
DataGridCell
cell = TryFindCell(info, column);
6101
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6165
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6227
DataGridCell
cell = MouseOverCell;
6315
DataGridCell
cell = null;
6320
cell = sourceElement as
DataGridCell
;
6405
private
DataGridCell
GetCellNearMouse()
6412
DataGridCell
closestCell = null;
6438
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
6441
DataGridCell
cell = cellTracker.Container;
6467
DataGridCell
cell = row.TryGetCell(DisplayIndexMap[0]);
6572
private
DataGridCell
MouseOverCell
6577
DataGridCell
cell = null;
6581
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(element);
6693
DataGridCell
cell = TryFindCell(item, column);
6759
private void EnsureCellAutomationValueHolder(
DataGridCell
cell)
6768
private void UpdateCellAutomationValueHolder(
DataGridCell
cell)
6794
public CellAutomationValueHolder(
DataGridCell
cell)
6961
private
DataGridCell
_cell;
6976
internal
DataGridCell
TryFindCell(DataGridCellInfo info)
6982
internal
DataGridCell
TryFindCell(ItemInfo info, DataGridColumn column)
6995
internal
DataGridCell
TryFindCell(object item, DataGridColumn column)
8496
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
8586
private
DataGridCell
_currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead)
8587
private
DataGridCell
_pendingCurrentCellContainer; // Reference to the cell container that will become the current cell
8619
private
DataGridCell
_focusedCell = null; // Holds the cell which has logical focus.
System\Windows\Controls\DataGridBoundColumn.cs (1)
207
if (element is
DataGridCell
cell)
System\Windows\Controls\DataGridCell.cs (40)
28
DefaultStyleKeyProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(typeof(
DataGridCell
)));
29
StyleProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle));
30
ClipProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceClip)));
31
KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local));
32
AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip));
35
SnapsToDevicePixelsProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange));
37
EventManager.RegisterClassHandler(typeof(
DataGridCell
), MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnAnyMouseLeftButtonDownThunk), true);
39
IsMouseOverPropertyKey.OverrideMetadata(typeof(
DataGridCell
), new UIPropertyMetadata(new PropertyChangedCallback(OnVisualStatePropertyChanged)));
41
EventManager.RegisterClassHandler(typeof(
DataGridCell
), LostFocusEvent, new RoutedEventHandler(OnAnyLostFocus), true);
42
EventManager.RegisterClassHandler(typeof(
DataGridCell
), GotFocusEvent, new RoutedEventHandler(OnAnyGotFocus), true);
53
_tracker = new ContainerTracking<
DataGridCell
>(this);
144
internal ContainerTracking<
DataGridCell
> Tracker
166
DependencyProperty.RegisterReadOnly("Column", typeof(DataGridColumn), typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnColumnChanged)));
179
DataGridCell
cell = sender as
DataGridCell
;
209
((
DataGridCell
)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells);
217
var
cell = (
DataGridCell
)d;
290
var
cell = d as
DataGridCell
;
432
if (DataGridHelper.BindingExpressionBelongsToElement<
DataGridCell
>(bindingExpressionsCopy[i], this))
455
public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged)));
459
((
DataGridCell
)sender).OnIsEditingChanged((bool)e.NewValue);
518
DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly));
527
var
cell = d as
DataGridCell
;
547
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
560
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
649
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged)));
653
DataGridCell
cell = (
DataGridCell
)sender;
704
public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
734
public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
877
((
DataGridCell
)sender).OnAnyMouseLeftButtonDown(e);
1035
DataGridCell
cell = (
DataGridCell
)d;
1122
private ContainerTracking<
DataGridCell
> _tracker;
System\Windows\Controls\DataGridCellInfo.cs (1)
41
public DataGridCellInfo(
DataGridCell
cell)
System\Windows\Controls\DataGridCellsPanel.cs (2)
1069
DataGridCell
cell = child as
DataGridCell
;
System\Windows\Controls\DataGridCheckBoxColumn.cs (4)
90
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
98
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
103
private CheckBox GenerateCheckBox(bool isEditing,
DataGridCell
cell)
121
if (element is
DataGridCell
cell && string.Equals(propertyName, "IsThreeState", StringComparison.Ordinal))
System\Windows\Controls\DataGridColumn.cs (4)
642
DataGridCell
cell = dataGridRow.TryGetCell(columnIndex);
659
internal FrameworkElement BuildVisualTree(bool isEditing, object dataItem,
DataGridCell
cell)
674
protected abstract FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem);
679
protected abstract FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem);
System\Windows\Controls\DataGridComboBoxColumn.cs (7)
408
if (element is
DataGridCell
cell)
484
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
499
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
562
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
563
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
579
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
580
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
System\Windows\Controls\DataGridHelper.cs (10)
236
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
300
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
525
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
544
if (BindingExpressionBelongsToElement<
DataGridCell
>(beb, cell))
614
internal static void CacheFlowDirection(FrameworkElement element,
DataGridCell
cell)
626
internal static void RestoreFlowDirection(FrameworkElement element,
DataGridCell
cell)
641
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
660
VisualTreeHelper.IsAncestorOf(cell, targetElement, typeof(
DataGridCell
)))
System\Windows\Controls\DataGridHyperlinkColumn.cs (6)
108
if (element is
DataGridCell
cell && !cell.IsEditing)
159
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
184
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
245
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
257
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
280
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\DataGridRow.cs (2)
1315
internal
DataGridCell
TryGetCell(int index)
1320
return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as
DataGridCell
;
System\Windows\Controls\DataGridTemplateColumn.cs (4)
159
private FrameworkElement LoadTemplateContent(bool isEditing, object dataItem,
DataGridCell
cell)
179
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
187
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
204
if (element is
DataGridCell
cell)
System\Windows\Controls\DataGridTextColumn.cs (7)
78
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
95
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
120
DataGridCell
cell = element as
DataGridCell
;
218
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
230
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
265
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (11)
115
DataGridCell
cell;
160
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
178
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
277
return item is
DataGridCell
;
304
DataGridCell
cell = (
DataGridCell
)element;
322
DataGridCell
cell = (
DataGridCell
)element;
419
ContainerTracking<
DataGridCell
> tracker = _cellTrackingRoot;
626
internal ContainerTracking<
DataGridCell
> CellTrackingRoot
636
private ContainerTracking<
DataGridCell
> _cellTrackingRoot; // Root of a linked list of active cell containers
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
141
internal bool Contains(
DataGridCell
cell)