1 instantiation of DataGridCell
PresentationFramework (1)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
300
return new
DataGridCell
();
172 references to DataGridCell
Microsoft.VisualStudio.LanguageServices (2)
ChangeSignature\ChangeSignatureDialog.xaml.cs (2)
225
var
cell = row.FindDescendant<
DataGridCell
>();
PresentationFramework (170)
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
25
public DataGridCellAutomationPeer(
DataGridCell
owner)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (3)
631
DataGridCell
cell = this.OwningCell;
854
private
DataGridCell
OwningCell
868
DataGridCell
cell = this.OwningCell;
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (2)
242
DataGridCell
cell = this.OwningDataGrid.TryFindCell(item, this.OwningDataGrid.Columns[0]);
446
column = (childItem as
DataGridCell
).Column;
System\Windows\Controls\DataGrid.cs (64)
1766
DataGridCell
cell = GetCellNearMouse();
2099
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2130
DataGridCell
cell = CurrentCellContainer;
2295
private
DataGridCell
GetEventCellOrCurrentCell(RoutedEventArgs e)
2299
return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<
DataGridCell
>(source);
2304
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2346
DataGridCell
cell = CurrentCellContainer;
2520
DataGridCell
cell = CurrentCellContainer;
2708
DataGridCell
cell = CurrentCellContainer;
2925
var
oldCellContainer = dataGrid._currentCellContainer;
2933
DataGridCell
cell = dataGrid._pendingCurrentCellContainer;
2988
private void UpdateCurrentCell(
DataGridCell
cell, bool isFocusWithinCell)
3006
internal
DataGridCell
CurrentCellContainer
3054
DataGridCell
cell = CurrentCellContainer;
3068
DataGridCell
cell = CurrentCellContainer;
3184
DataGridCell
cellContainer = CurrentCellContainer;
3240
internal bool CancelEdit(
DataGridCell
cell)
3242
DataGridCell
currentCell = CurrentCellContainer;
3326
private bool EndEdit(RoutedCommand command,
DataGridCell
cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode)
3420
internal
DataGridCell
FocusedCell
3725
private void UpdateRowEditing(
DataGridCell
cell)
4631
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
4634
DataGridCell
cell = cellTracker.Container;
4652
DataGridCell
cell = TryFindCell(cellInfo);
4710
internal void CellIsSelectedChanged(
DataGridCell
cell, bool isSelected)
4732
internal void HandleSelectionForCellInput(
DataGridCell
cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect)
5488
DataGridCell
cell = TryFindCell(info, column);
5581
DataGridCell
currentCellContainer = CurrentCellContainer;
5849
DataGridCell
nextCellContainer = TryFindCell(nextInfo, nextColumn);
5915
DataGridCell
currentCellContainer = CurrentCellContainer;
5949
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
5954
DataGridCell
realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column);
5980
DataGridCell
currentCellContainer = CurrentCellContainer;
6029
private
DataGridCell
GetCellForSelectAndEditOnFocusMove()
6031
DataGridCell
newCell = Keyboard.FocusedElement as
DataGridCell
;
6042
private void SelectAndEditOnFocusMove(KeyEventArgs e,
DataGridCell
oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey)
6044
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
6104
DataGridCell
cell = TryFindCell(info, column);
6158
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6222
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6284
DataGridCell
cell = MouseOverCell;
6372
DataGridCell
cell = null;
6377
cell = sourceElement as
DataGridCell
;
6462
private
DataGridCell
GetCellNearMouse()
6469
DataGridCell
closestCell = null;
6495
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
6498
DataGridCell
cell = cellTracker.Container;
6524
DataGridCell
cell = row.TryGetCell(DisplayIndexMap[0]);
6629
private
DataGridCell
MouseOverCell
6634
DataGridCell
cell = null;
6638
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(element);
6750
DataGridCell
cell = TryFindCell(item, column);
6816
private void EnsureCellAutomationValueHolder(
DataGridCell
cell)
6825
private void UpdateCellAutomationValueHolder(
DataGridCell
cell)
6851
public CellAutomationValueHolder(
DataGridCell
cell)
7017
private
DataGridCell
_cell;
7032
internal
DataGridCell
TryFindCell(DataGridCellInfo info)
7038
internal
DataGridCell
TryFindCell(ItemInfo info, DataGridColumn column)
7051
internal
DataGridCell
TryFindCell(object item, DataGridColumn column)
8555
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
8645
private
DataGridCell
_currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead)
8646
private
DataGridCell
_pendingCurrentCellContainer; // Reference to the cell container that will become the current cell
8678
private
DataGridCell
_focusedCell = null; // Holds the cell which has logical focus.
System\Windows\Controls\DataGridBoundColumn.cs (1)
214
if (element is
DataGridCell
cell)
System\Windows\Controls\DataGridCell.cs (40)
36
DefaultStyleKeyProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(typeof(
DataGridCell
)));
37
StyleProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle));
38
ClipProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceClip)));
39
KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local));
40
AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip));
43
SnapsToDevicePixelsProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange));
45
EventManager.RegisterClassHandler(typeof(
DataGridCell
), MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnAnyMouseLeftButtonDownThunk), true);
47
IsMouseOverPropertyKey.OverrideMetadata(typeof(
DataGridCell
), new UIPropertyMetadata(new PropertyChangedCallback(OnVisualStatePropertyChanged)));
49
EventManager.RegisterClassHandler(typeof(
DataGridCell
), LostFocusEvent, new RoutedEventHandler(OnAnyLostFocus), true);
50
EventManager.RegisterClassHandler(typeof(
DataGridCell
), GotFocusEvent, new RoutedEventHandler(OnAnyGotFocus), true);
61
_tracker = new ContainerTracking<
DataGridCell
>(this);
152
internal ContainerTracking<
DataGridCell
> Tracker
174
DependencyProperty.RegisterReadOnly("Column", typeof(DataGridColumn), typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnColumnChanged)));
187
DataGridCell
cell = sender as
DataGridCell
;
220
((
DataGridCell
)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells);
228
var
cell = (
DataGridCell
)d;
301
var
cell = d as
DataGridCell
;
443
if (DataGridHelper.BindingExpressionBelongsToElement<
DataGridCell
>(bindingExpressionsCopy[i], this))
466
public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged)));
470
((
DataGridCell
)sender).OnIsEditingChanged((bool)e.NewValue);
529
DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly));
538
var
cell = d as
DataGridCell
;
558
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
571
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
669
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged)));
673
DataGridCell
cell = (
DataGridCell
)sender;
727
public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
757
public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
896
((
DataGridCell
)sender).OnAnyMouseLeftButtonDown(e);
1060
DataGridCell
cell = (
DataGridCell
)d;
1147
private ContainerTracking<
DataGridCell
> _tracker;
System\Windows\Controls\DataGridCellInfo.cs (1)
47
public DataGridCellInfo(
DataGridCell
cell)
System\Windows\Controls\DataGridCellsPanel.cs (2)
1081
DataGridCell
cell = child as
DataGridCell
;
System\Windows\Controls\DataGridCheckBoxColumn.cs (4)
95
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
103
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
108
private CheckBox GenerateCheckBox(bool isEditing,
DataGridCell
cell)
126
if (element is
DataGridCell
cell && string.Equals(propertyName, "IsThreeState", StringComparison.Ordinal))
System\Windows\Controls\DataGridColumn.cs (4)
646
DataGridCell
cell = dataGridRow.TryGetCell(columnIndex);
663
internal FrameworkElement BuildVisualTree(bool isEditing, object dataItem,
DataGridCell
cell)
678
protected abstract FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem);
683
protected abstract FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem);
System\Windows\Controls\DataGridComboBoxColumn.cs (7)
413
if (element is
DataGridCell
cell)
489
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
504
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
567
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
568
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
584
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
585
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
System\Windows\Controls\DataGridHelper.cs (10)
243
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
307
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
532
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
551
if (BindingExpressionBelongsToElement<
DataGridCell
>(beb, cell))
621
internal static void CacheFlowDirection(FrameworkElement element,
DataGridCell
cell)
633
internal static void RestoreFlowDirection(FrameworkElement element,
DataGridCell
cell)
648
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
667
VisualTreeHelper.IsAncestorOf(cell, targetElement, typeof(
DataGridCell
)))
System\Windows\Controls\DataGridHyperlinkColumn.cs (6)
115
if (element is
DataGridCell
cell && !cell.IsEditing)
169
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
194
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
255
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
267
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
290
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\DataGridRow.cs (2)
1357
internal
DataGridCell
TryGetCell(int index)
1362
return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as
DataGridCell
;
System\Windows\Controls\DataGridTemplateColumn.cs (4)
164
private FrameworkElement LoadTemplateContent(bool isEditing, object dataItem,
DataGridCell
cell)
184
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
192
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
209
if (element is
DataGridCell
cell)
System\Windows\Controls\DataGridTextColumn.cs (7)
82
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
99
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
124
DataGridCell
cell = element as
DataGridCell
;
222
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
234
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
269
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (11)
121
DataGridCell
cell;
166
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
184
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
283
return item is
DataGridCell
;
310
DataGridCell
cell = (
DataGridCell
)element;
328
DataGridCell
cell = (
DataGridCell
)element;
428
ContainerTracking<
DataGridCell
> tracker = _cellTrackingRoot;
633
internal ContainerTracking<
DataGridCell
> CellTrackingRoot
643
private ContainerTracking<
DataGridCell
> _cellTrackingRoot; // Root of a linked list of active cell containers
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
146
internal bool Contains(
DataGridCell
cell)