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