1 instantiation of DataGridCell
PresentationFramework (1)
src\Framework\System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
301
return new
DataGridCell
();
233 references to DataGridCell
PresentationFramework (175)
src\Framework\System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
21
public DataGridCellAutomationPeer(
DataGridCell
owner)
src\Framework\System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (3)
605
DataGridCell
cell = this.OwningCell;
828
private
DataGridCell
OwningCell
842
DataGridCell
cell = this.OwningCell;
src\Framework\System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (2)
245
DataGridCell
cell = this.OwningDataGrid.TryFindCell(item, this.OwningDataGrid.Columns[0]);
449
column = (childItem as
DataGridCell
).Column;
src\Framework\System\Windows\Controls\DataGrid.cs (64)
1770
DataGridCell
cell = GetCellNearMouse();
2103
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2134
DataGridCell
cell = CurrentCellContainer;
2300
private
DataGridCell
GetEventCellOrCurrentCell(RoutedEventArgs e)
2304
return ((source == this) || (source == null)) ? CurrentCellContainer : DataGridHelper.FindVisualParent<
DataGridCell
>(source);
2309
DataGridCell
cellContainer = GetEventCellOrCurrentCell(e);
2351
DataGridCell
cell = CurrentCellContainer;
2525
DataGridCell
cell = CurrentCellContainer;
2713
DataGridCell
cell = CurrentCellContainer;
2930
var
oldCellContainer = dataGrid._currentCellContainer;
2938
DataGridCell
cell = dataGrid._pendingCurrentCellContainer;
2993
private void UpdateCurrentCell(
DataGridCell
cell, bool isFocusWithinCell)
3011
internal
DataGridCell
CurrentCellContainer
3059
DataGridCell
cell = CurrentCellContainer;
3073
DataGridCell
cell = CurrentCellContainer;
3189
DataGridCell
cellContainer = CurrentCellContainer;
3245
internal bool CancelEdit(
DataGridCell
cell)
3247
DataGridCell
currentCell = CurrentCellContainer;
3331
private bool EndEdit(RoutedCommand command,
DataGridCell
cellContainer, DataGridEditingUnit editingUnit, bool exitEditMode)
3425
internal
DataGridCell
FocusedCell
3730
private void UpdateRowEditing(
DataGridCell
cell)
4636
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
4639
DataGridCell
cell = cellTracker.Container;
4657
DataGridCell
cell = TryFindCell(cellInfo);
4715
internal void CellIsSelectedChanged(
DataGridCell
cell, bool isSelected)
4737
internal void HandleSelectionForCellInput(
DataGridCell
cell, bool startDragging, bool allowsExtendSelect, bool allowsMinimalSelect)
5493
DataGridCell
cell = TryFindCell(info, column);
5586
DataGridCell
currentCellContainer = CurrentCellContainer;
5854
DataGridCell
nextCellContainer = TryFindCell(nextInfo, nextColumn);
5920
DataGridCell
currentCellContainer = CurrentCellContainer;
5954
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
5959
DataGridCell
realNewCell = TryFindCell(newCell.RowDataItem, newCell.Column);
5985
DataGridCell
currentCellContainer = CurrentCellContainer;
6034
private
DataGridCell
GetCellForSelectAndEditOnFocusMove()
6036
DataGridCell
newCell = Keyboard.FocusedElement as
DataGridCell
;
6047
private void SelectAndEditOnFocusMove(KeyEventArgs e,
DataGridCell
oldCell, bool wasEditing, bool allowsExtendSelect, bool ignoreControlKey)
6049
DataGridCell
newCell = GetCellForSelectAndEditOnFocusMove();
6109
DataGridCell
cell = TryFindCell(info, column);
6163
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6227
DataGridCell
cell = TryFindCell(targetInfo, currentColumn);
6289
DataGridCell
cell = MouseOverCell;
6377
DataGridCell
cell = null;
6382
cell = sourceElement as
DataGridCell
;
6467
private
DataGridCell
GetCellNearMouse()
6474
DataGridCell
closestCell = null;
6500
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
6503
DataGridCell
cell = cellTracker.Container;
6529
DataGridCell
cell = row.TryGetCell(DisplayIndexMap[0]);
6634
private
DataGridCell
MouseOverCell
6639
DataGridCell
cell = null;
6643
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(element);
6755
DataGridCell
cell = TryFindCell(item, column);
6821
private void EnsureCellAutomationValueHolder(
DataGridCell
cell)
6830
private void UpdateCellAutomationValueHolder(
DataGridCell
cell)
6856
public CellAutomationValueHolder(
DataGridCell
cell)
7019
private
DataGridCell
_cell;
7035
internal
DataGridCell
TryFindCell(DataGridCellInfo info)
7041
internal
DataGridCell
TryFindCell(ItemInfo info, DataGridColumn column)
7054
internal
DataGridCell
TryFindCell(object item, DataGridColumn column)
8582
ContainerTracking<
DataGridCell
> cellTracker = cellsPresenter.CellTrackingRoot;
8672
private
DataGridCell
_currentCellContainer; // Reference to the cell container corresponding to CurrentCell (use CurrentCellContainer property instead)
8673
private
DataGridCell
_pendingCurrentCellContainer; // Reference to the cell container that will become the current cell
8705
private
DataGridCell
_focusedCell = null; // Holds the cell which has logical focus.
src\Framework\System\Windows\Controls\DataGridBoundColumn.cs (2)
215
DataGridCell
cell = element as
DataGridCell
;
src\Framework\System\Windows\Controls\DataGridCell.cs (40)
34
DefaultStyleKeyProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(typeof(
DataGridCell
)));
35
StyleProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle));
36
ClipProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceClip)));
37
KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local));
38
AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip));
41
SnapsToDevicePixelsProperty.OverrideMetadata(typeof(
DataGridCell
), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange));
43
EventManager.RegisterClassHandler(typeof(
DataGridCell
), MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnAnyMouseLeftButtonDownThunk), true);
45
IsMouseOverPropertyKey.OverrideMetadata(typeof(
DataGridCell
), new UIPropertyMetadata(new PropertyChangedCallback(OnVisualStatePropertyChanged)));
47
EventManager.RegisterClassHandler(typeof(
DataGridCell
), LostFocusEvent, new RoutedEventHandler(OnAnyLostFocus), true);
48
EventManager.RegisterClassHandler(typeof(
DataGridCell
), GotFocusEvent, new RoutedEventHandler(OnAnyGotFocus), true);
56
_tracker = new ContainerTracking<
DataGridCell
>(this);
147
internal ContainerTracking<
DataGridCell
> Tracker
169
DependencyProperty.RegisterReadOnly("Column", typeof(DataGridColumn), typeof(
DataGridCell
), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnColumnChanged)));
182
DataGridCell
cell = sender as
DataGridCell
;
215
((
DataGridCell
)d).NotifyPropertyChanged(d, string.Empty, e, DataGridNotificationTarget.Cells);
223
var
cell = (
DataGridCell
)d;
296
var
cell = d as
DataGridCell
;
438
if (DataGridHelper.BindingExpressionBelongsToElement<
DataGridCell
>(bindingExpressionsCopy[i], this))
461
public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register("IsEditing", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsEditingChanged)));
465
((
DataGridCell
)sender).OnIsEditingChanged((bool)e.NewValue);
524
DependencyProperty.RegisterReadOnly("IsReadOnly", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, OnNotifyIsReadOnlyChanged, OnCoerceIsReadOnly));
533
var
cell = d as
DataGridCell
;
553
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
566
DataGridCell
cell = DataGridHelper.FindVisualParent<
DataGridCell
>(e.OriginalSource as UIElement);
664
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(
DataGridCell
), new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsSelectedChanged)));
668
DataGridCell
cell = (
DataGridCell
)sender;
722
public static readonly RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
752
public static readonly RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent("Unselected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(
DataGridCell
));
891
((
DataGridCell
)sender).OnAnyMouseLeftButtonDown(e);
1016
DataGridCell
cell = (
DataGridCell
)d;
1103
private ContainerTracking<
DataGridCell
> _tracker;
src\Framework\System\Windows\Controls\DataGridCellInfo.cs (1)
51
public DataGridCellInfo(
DataGridCell
cell)
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (2)
1083
DataGridCell
cell = child as
DataGridCell
;
src\Framework\System\Windows\Controls\DataGridCheckBoxColumn.cs (5)
84
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
92
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
97
private CheckBox GenerateCheckBox(bool isEditing,
DataGridCell
cell)
115
DataGridCell
cell = element as
DataGridCell
;
src\Framework\System\Windows\Controls\DataGridColumn.cs (4)
653
DataGridCell
cell = dataGridRow.TryGetCell(columnIndex);
670
internal FrameworkElement BuildVisualTree(bool isEditing, object dataItem,
DataGridCell
cell)
685
protected abstract FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem);
690
protected abstract FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem);
src\Framework\System\Windows\Controls\DataGridComboBoxColumn.cs (8)
414
DataGridCell
cell = element as
DataGridCell
;
491
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
506
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
569
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
570
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
586
DataGridHelper.CacheFlowDirection(cb.EditableTextBoxSite, cb.Parent as
DataGridCell
);
587
DataGridHelper.CacheFlowDirection(cb, cb.Parent as
DataGridCell
);
src\Framework\System\Windows\Controls\DataGridHelper.cs (10)
244
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
308
Debug.Assert((cell is
DataGridCell
) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
533
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
550
if (BindingExpressionBelongsToElement<
DataGridCell
>(beb, cell))
620
internal static void CacheFlowDirection(FrameworkElement element,
DataGridCell
cell)
632
internal static void RestoreFlowDirection(FrameworkElement element,
DataGridCell
cell)
647
DataGridCell
cell = (element != null) ? element.Parent as
DataGridCell
: null;
666
VisualTreeHelper.IsAncestorOf(cell, targetElement, typeof(
DataGridCell
)))
src\Framework\System\Windows\Controls\DataGridHyperlinkColumn.cs (7)
116
DataGridCell
cell = element as
DataGridCell
;
171
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
196
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
257
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
269
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
292
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
src\Framework\System\Windows\Controls\DataGridRow.cs (2)
1358
internal
DataGridCell
TryGetCell(int index)
1363
return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as
DataGridCell
;
src\Framework\System\Windows\Controls\DataGridTemplateColumn.cs (5)
165
private FrameworkElement LoadTemplateContent(bool isEditing, object dataItem,
DataGridCell
cell)
185
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
193
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
210
DataGridCell
cell = element as
DataGridCell
;
src\Framework\System\Windows\Controls\DataGridTextColumn.cs (7)
83
protected override FrameworkElement GenerateElement(
DataGridCell
cell, object dataItem)
100
protected override FrameworkElement GenerateEditingElement(
DataGridCell
cell, object dataItem)
125
DataGridCell
cell = element as
DataGridCell
;
223
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
235
DataGridHelper.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as
DataGridCell
: null);
270
DataGridCell
cell = DataGridOwner.CurrentCellContainer;
src\Framework\System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (11)
122
DataGridCell
cell;
167
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
185
cell = (
DataGridCell
)ItemContainerGenerator.ContainerFromIndex(i);
284
return item is
DataGridCell
;
311
DataGridCell
cell = (
DataGridCell
)element;
329
DataGridCell
cell = (
DataGridCell
)element;
429
ContainerTracking<
DataGridCell
> tracker = _cellTrackingRoot;
634
internal ContainerTracking<
DataGridCell
> CellTrackingRoot
644
private ContainerTracking<
DataGridCell
> _cellTrackingRoot; // Root of a linked list of active cell containers
src\Framework\System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
147
internal bool Contains(
DataGridCell
cell)
System.Activities.Presentation (58)
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (2)
452
DialogPropertyValueEditor OnLoadExtendedValueEditor(
DataGridCell
cell, object instance)
458
ModelProperty OnShowExtendedValueEditor(
DataGridCell
cell, object instance)
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (51)
205
DataGridCell
currentCellContainer = GetCell(dataGrid, items.IndexOf(currentCell.Item), currentColumnIndex);
232
void CommitAnyEdit(
DataGridCell
currentCellContainer)
235
DataGridCell
cell = currentCellContainer;
261
public Action<Control,
DataGridCell
, bool> NotifyBeginCellEditCallback
268
public Action<Control,
DataGridCell
> NotifyEndCellEditCallback
330
public Func<
DataGridCell
, object, ModelProperty> LoadDynamicContentDataCallback
342
public Func<
DataGridCell
, object, DialogPropertyValueEditor> LoadCustomPropertyValueEditorCallback
418
DataGridCell
cell = DataGridHelper.GetCell(this.dataGrid, items.CurrentPosition, columnIndex);
540
void NotifyEditingControlLoaded(Control control,
DataGridCell
cell, bool isNewRowLoaded)
566
void NotifyEditingControlUnloaded(Control control,
DataGridCell
cell)
590
var
cell = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>((DependencyObject)args.OriginalSource);
603
var
cell = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>((DependencyObject)args.OriginalSource);
646
DataGridCell
cell = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>(ctrl);
664
DataGridCell
cell = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>(ctrl);
680
DataGridCell
cell = sender as
DataGridCell
;
737
var
cell = DataGridHelper.GetCell(this.dataGrid, rowIndex, columnIndex);
751
void OnDynamicContentColumnLoaded(
DataGridCell
cell, ContentControl contentContainer)
803
var
cell = DataGridHelper.GetCell(this.dataGrid, rowIndex, columnIndex);
824
Style style = null == baseStyle ? new Style(typeof(
DataGridCell
)) : new Style(typeof(
DataGridCell
), baseStyle);
827
style.Setters.Add(new EventSetter(
DataGridCell
.PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(this.OnPreviewCellMouseLeftButtonDown)));
829
style.Setters.Add(new Setter(
DataGridCell
.WidthProperty, new Binding("Column.ActualWidth")
893
var
dataGridCell = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>(container);
922
if (null != e && null != e.OriginalSource && e.OriginalSource.GetType() == typeof(
DataGridCell
))
991
public static
DataGridCell
GetCell(DataGrid dataGrid, int row, int column)
1000
DataGridCell
cell = (
DataGridCell
)presenter.ItemContainerGenerator.ContainerFromIndex(column);
1006
cell = (
DataGridCell
)presenter.ItemContainerGenerator.ContainerFromIndex(column);
1195
public abstract bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded);
1196
public abstract bool ControlUnloaded(Control control,
DataGridCell
cell);
1216
public override bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded)
1223
public override bool ControlUnloaded(Control control,
DataGridCell
cell)
1236
public override bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded)
1257
public override bool ControlUnloaded(Control control,
DataGridCell
cell)
1270
public override bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded)
1313
public override bool ControlUnloaded(Control control,
DataGridCell
cell)
1327
DataGridCell
cell;
1339
public override bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded)
1356
public override bool ControlUnloaded(Control control,
DataGridCell
cell)
1396
DataGridCell
cell;
1405
public override bool HandleControlLoaded(Control control,
DataGridCell
cell, bool newRowLoaded)
1432
public override bool ControlUnloaded(Control control,
DataGridCell
cell)
1486
internal ResolveTemplateParams(
DataGridCell
cell, object instance)
1493
public
DataGridCell
Cell { get; private set; }
1545
currentFocus = VisualTreeUtils.FindVisualAncestor<
DataGridCell
>(currentFocus) ?? currentFocus;
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (5)
137
DataGridCell
cell = DataGridHelper.GetCell(this.variableDataGrid, index, 1);
153
DataGridCell
cell = DataGridHelper.GetCell(this.variableDataGrid, index, 2);
441
DataGridCell
cell = DataGridHelper.GetCell(this.variableDataGrid, index, 2);
533
DialogPropertyValueEditor OnLoadExtendedValueEditor(
DataGridCell
cell, object instance)
539
ModelProperty OnShowExtendedValueEditor(
DataGridCell
cell, object instance)