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