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)
1752
DataGridCell
cell = GetCellNearMouse();
2084
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2115
DataGridCell
cell = CurrentCellContainer;
2277
private
DataGridCell
GetEventCellOrCurrentCell(RoutedEventArgs e)
2281
return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<
DataGridCell
>(source);
2286
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2328
DataGridCell
cell = CurrentCellContainer;
2496
DataGridCell
cell = CurrentCellContainer;
2681
DataGridCell
cell = CurrentCellContainer;
2898
var
oldCellContainer = dataGrid._currentCellContainer;
2906
DataGridCell
cell = dataGrid._pendingCurrentCellContainer;
2958
private void UpdateCurrentCell(
DataGridCell
cell, bool isFocusWithinCell)
2976
internal
DataGridCell
CurrentCellContainer
3024
DataGridCell
cell = CurrentCellContainer;
3038
DataGridCell
cell = CurrentCellContainer;
3151
DataGridCell
cellContainer = CurrentCellContainer;
3207
internal bool CancelEdit(
DataGridCell
cell)
3209
DataGridCell
currentCell = CurrentCellContainer;
3293
private bool EndEdit(RoutedCommand command,
DataGridCell
cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode)
3387
internal
DataGridCell
FocusedCell
3692
private void UpdateRowEditing(
DataGridCell
cell)
4589
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
4592
DataGridCell
cell = cellTracker.Container;
4610
DataGridCell
cell = TryFindCell(cellInfo);
4665
internal void CellIsSelectedChanged(
DataGridCell
cell, bool isSelected)
4687
internal void HandleSelectionForCellInput(
DataGridCell
cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect)
5440
DataGridCell
cell = TryFindCell(info, column);
5533
DataGridCell
currentCellContainer = CurrentCellContainer;
5801
DataGridCell
nextCellContainer = TryFindCell(nextInfo, nextColumn);
5867
DataGridCell
currentCellContainer = CurrentCellContainer;
5901
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
5906
DataGridCell
realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column);
5932
DataGridCell
currentCellContainer = CurrentCellContainer;
5978
private
DataGridCell
GetCellForSelectAndEditOnFocusMove()
5980
DataGridCell
newCell = Keyboard.FocusedElement as
DataGridCell
;
5991
private void SelectAndEditOnFocusMove(KeyEventArgs e,
DataGridCell
oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey)
5993
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
6053
DataGridCell
cell = TryFindCell(info, column);
6107
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6171
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6233
DataGridCell
cell = MouseOverCell;
6321
DataGridCell
cell = null;
6326
cell = sourceElement as
DataGridCell
;
6411
private
DataGridCell
GetCellNearMouse()
6418
DataGridCell
closestCell = null;
6444
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
6447
DataGridCell
cell = cellTracker.Container;
6473
DataGridCell
cell = row.TryGetCell(DisplayIndexMap[0]);
6578
private
DataGridCell
MouseOverCell
6583
DataGridCell
cell = null;
6587
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(element);
6699
DataGridCell
cell = TryFindCell(item, column);
6765
private void EnsureCellAutomationValueHolder(
DataGridCell
cell)
6774
private void UpdateCellAutomationValueHolder(
DataGridCell
cell)
6800
public CellAutomationValueHolder(
DataGridCell
cell)
6967
private
DataGridCell
_cell;
6982
internal
DataGridCell
TryFindCell(DataGridCellInfo info)
6988
internal
DataGridCell
TryFindCell(ItemInfo info, DataGridColumn column)
7001
internal
DataGridCell
TryFindCell(object item, DataGridColumn column)
8502
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
8592
private
DataGridCell
_currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead)
8593
private
DataGridCell
_pendingCurrentCellContainer; // Reference to the cell container that will become the current cell
8625
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)
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)
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)