247 references to DataGridHelper
PresentationFramework (247)
src\Framework\System\Windows\Controls\DataGrid.cs (26)
607
if (
DataGridHelper
.ShouldNotifyDataGrid(target))
634
if (
DataGridHelper
.ShouldNotifyRowSubtree(target))
645
if (
DataGridHelper
.ShouldNotifyColumnCollection(target) ||
DataGridHelper
.ShouldNotifyColumns(target))
650
if ((
DataGridHelper
.ShouldNotifyColumnHeadersPresenter(target) ||
DataGridHelper
.ShouldNotifyColumnHeaders(target)) && ColumnHeadersPresenter != null)
910
if (!
DataGridHelper
.IsDefaultValue(d, DataGrid.RowStyleProperty))
1022
if (!
DataGridHelper
.IsDefaultValue(d, DataGrid.RowStyleSelectorProperty))
1915
_internalScrollContentPresenter =
DataGridHelper
.FindVisualParent<ScrollContentPresenter>(_internalItemsHost);
1920
_internalScrollContentPresenter =
DataGridHelper
.FindVisualParent<ScrollContentPresenter>(row);
1932
_internalScrollHost =
DataGridHelper
.FindVisualParent<ScrollViewer>(_internalItemsHost);
1937
_internalScrollHost =
DataGridHelper
.FindVisualParent<ScrollViewer>(row);
2304
return ((source == this) || (source == null)) ? CurrentCellContainer :
DataGridHelper
.FindVisualParent<DataGridCell>(source);
3779
if (
DataGridHelper
.IsDefaultValue(this, CanUserAddRowsProperty))
5633
GroupItem currentGroupItem =
DataGridHelper
.FindVisualParent<GroupItem>(currentCellContainer);
5895
DataGridRow focusRow =
DataGridHelper
.FindVisualParent<DataGridRow>(focusContainer);
6194
startingRow =
DataGridHelper
.FindVisualParent<DataGridRow>(startingElement);
6212
targetRowElement =
DataGridHelper
.FindVisualParent<DataGridRow>(targetElement);
6622
row =
DataGridHelper
.FindVisualParent<DataGridRow>(element);
6643
cell =
DataGridHelper
.FindVisualParent<DataGridCell>(element);
7094
if(
DataGridHelper
.IsPropertyTransferEnabled(dataGrid, CanUserSortColumnsProperty) &&
7095
DataGridHelper
.IsDefaultValue(dataGrid, CanUserSortColumnsProperty) &&
7106
DataGridHelper
.TransferProperty(dataGrid, CanUserSortColumnsProperty);
7674
DataGridHelper
.TransferProperty(this, CanUserSortColumnsProperty);
8093
if (!
DataGridHelper
.IsDefaultValue(d, DataGrid.EnableRowVirtualizationProperty))
8549
CellsPanelHorizontalOffset =
DataGridHelper
.GetParentCellsPanelHorizontalOffset(cell);
src\Framework\System\Windows\Controls\DataGridBoundColumn.cs (2)
41
var bindingSortMemberPath =
DataGridHelper
.GetPathFromBinding(column.Binding as Binding);
79
if (
DataGridHelper
.IsOneWay(_binding))
src\Framework\System\Windows\Controls\DataGridCell.cs (25)
130
DataGridHelper
.TransferProperty(this, StyleProperty);
131
DataGridHelper
.TransferProperty(this, IsReadOnlyProperty);
202
DataGridHelper
.TransferProperty(this, StyleProperty);
203
DataGridHelper
.TransferProperty(this, IsReadOnlyProperty);
249
if (
DataGridHelper
.ShouldNotifyCells(target))
253
DataGridHelper
.OnColumnWidthChanged(this, e);
257
DataGridHelper
.TransferProperty(this, StyleProperty);
261
DataGridHelper
.TransferProperty(this, IsReadOnlyProperty);
274
if (
DataGridHelper
.ShouldRefreshCellContent(target))
297
return
DataGridHelper
.GetCoercedTransferPropertyValue(
438
if (
DataGridHelper
.BindingExpressionBelongsToElement<DataGridCell>(bindingExpressionsCopy[i], this))
540
return
DataGridHelper
.GetCoercedTransferPropertyValue(
553
DataGridCell cell =
DataGridHelper
.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement);
566
DataGridCell cell =
DataGridHelper
.FindVisualParent<DataGridCell>(e.OriginalSource as UIElement);
795
bool horizontalLinesVisible =
DataGridHelper
.IsGridLineVisible(dataGridOwner, /*isHorizontal = */ true);
796
bool verticalLinesVisible =
DataGridHelper
.IsGridLineVisible(dataGridOwner, /*isHorizontal = */ false);
803
constraint =
DataGridHelper
.SubtractFromSize(constraint, horizontalLineThickness, /*height = */ true);
808
constraint =
DataGridHelper
.SubtractFromSize(constraint, verticalLineThickness, /*height = */ false);
831
bool horizontalLinesVisible =
DataGridHelper
.IsGridLineVisible(dataGridOwner, /*isHorizontal = */ true);
832
bool verticalLinesVisible =
DataGridHelper
.IsGridLineVisible(dataGridOwner, /*isHorizontal = */ false);
838
arrangeSize =
DataGridHelper
.SubtractFromSize(arrangeSize, horizontalLineThickness, /*height = */ true);
843
arrangeSize =
DataGridHelper
.SubtractFromSize(arrangeSize, verticalLineThickness, /*height = */ false);
866
if (
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ false))
875
if (
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ true))
1018
Geometry frozenGeometry =
DataGridHelper
.GetFrozenClipForCell(cell);
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (2)
983
if (child != null &&
DataGridHelper
.TreeHasFocusAndTabStop(child))
2035
IHierarchicalVirtualizationAndScrollInfo hvsInfo =
DataGridHelper
.FindParent<GroupItem>(parentRowsPresenter) as IHierarchicalVirtualizationAndScrollInfo;
src\Framework\System\Windows\Controls\DataGridColumn.cs (39)
58
return
DataGridHelper
.GetCoercedTransferPropertyValue(
133
return
DataGridHelper
.GetCoercedTransferPropertyValue(
167
return (bool)
DataGridHelper
.GetCoercedTransferPropertyValue(
274
double displayValue =
DataGridHelper
.CoerceToMinMax(changedWidth.DesiredValue, column.MinWidth, column.MaxWidth);
394
DataGridLength width = (DataGridLength)
DataGridHelper
.GetCoercedTransferPropertyValue(
403
newDisplayValue = (DoubleUtil.IsNaN(newDisplayValue) ? newDisplayValue :
DataGridHelper
.CoerceToMinMax(newDisplayValue, column.MinWidth, column.MaxWidth));
422
return
DataGridHelper
.GetCoercedTransferPropertyValue(
436
double transferValue = (double)
DataGridHelper
.GetCoercedTransferPropertyValue(
551
double displayWidth =
DataGridHelper
.CoerceToMinMax(pixelWidth, minWidth, maxWidth);
566
double originalDesiredValue =
DataGridHelper
.CoerceToMinMax(width.DesiredValue, minWidth, maxWidth);
714
DataGridHelper
.UpdateTarget(editingElement);
724
return
DataGridHelper
.ValidateWithoutUpdate(editingElement);
820
if (
DataGridHelper
.ShouldNotifyColumns(target))
828
DataGridHelper
.TransferProperty(this, MaxWidthProperty);
832
DataGridHelper
.TransferProperty(this, MinWidthProperty);
836
DataGridHelper
.TransferProperty(this, WidthProperty);
840
DataGridHelper
.TransferProperty(this, HeaderStyleProperty);
844
DataGridHelper
.TransferProperty(this, CellStyleProperty);
848
DataGridHelper
.TransferProperty(this, IsReadOnlyProperty);
852
DataGridHelper
.TransferProperty(this, DragIndicatorStyleProperty);
860
DataGridHelper
.TransferProperty(this, CanUserSortProperty);
864
DataGridHelper
.TransferProperty(this, CanUserResizeProperty);
868
DataGridHelper
.TransferProperty(this, CanUserReorderProperty);
928
DataGridHelper
.TransferProperty(this, MinWidthProperty);
929
DataGridHelper
.TransferProperty(this, MaxWidthProperty);
930
DataGridHelper
.TransferProperty(this, WidthProperty);
931
DataGridHelper
.TransferProperty(this, HeaderStyleProperty);
932
DataGridHelper
.TransferProperty(this, CellStyleProperty);
933
DataGridHelper
.TransferProperty(this, IsReadOnlyProperty);
934
DataGridHelper
.TransferProperty(this, DragIndicatorStyleProperty);
935
DataGridHelper
.TransferProperty(this, CanUserSortProperty);
936
DataGridHelper
.TransferProperty(this, CanUserReorderProperty);
937
DataGridHelper
.TransferProperty(this, CanUserResizeProperty);
1078
return
DataGridHelper
.GetCoercedTransferPropertyValue(
1094
if (!
DataGridHelper
.IsPropertyTransferEnabled(d, CanUserSortProperty))
1097
DataGridHelper
.TransferProperty(d, CanUserSortProperty);
1329
return
DataGridHelper
.GetCoercedTransferPropertyValue(
1355
return
DataGridHelper
.GetCoercedTransferPropertyValue(
1488
return
DataGridHelper
.GetCoercedTransferPropertyValue(
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (8)
168
if (
DataGridHelper
.ShouldNotifyColumnCollection(target))
212
if (
DataGridHelper
.ShouldNotifyColumns(target))
283
if (
DataGridHelper
.IsDefaultValue(column, DataGridColumn.DisplayIndexProperty))
518
bool hasDefaultDisplayIndex =
DataGridHelper
.IsDefaultValue(currentColumn, DataGridColumn.DisplayIndexProperty);
660
if (displayIndex == -1 &&
DataGridHelper
.IsDefaultValue(column, DataGridColumn.DisplayIndexProperty))
1196
double displayValue =
DataGridHelper
.CoerceToMinMax(DoubleUtil.IsNaN(width.DesiredValue) ? minWidth : width.DesiredValue, minWidth, column.MaxWidth);
1396
double newDesiredValue =
DataGridHelper
.CoerceToMinMax(width.DesiredValue, changedColumn.MinWidth, changedColumn.MaxWidth);
1936
double columnDisplayWidth =
DataGridHelper
.CoerceToMinMax(width.DisplayValue + widthDelta, column.MinWidth, column.MaxWidth);
src\Framework\System\Windows\Controls\DataGridComboBoxColumn.cs (14)
64
var bindingSortMemberPath =
DataGridHelper
.GetPathFromBinding(column.EffectiveBinding as Binding);
124
if (
DataGridHelper
.IsOneWay(EffectiveBinding))
438
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.SelectedValuePathProperty, SelectedValuePathProperty);
441
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.DisplayMemberPathProperty, DisplayMemberPathProperty);
444
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.ItemsSourceProperty, ItemsSourceProperty);
498
DataGridHelper
.RestoreFlowDirection(comboBox, cell);
513
DataGridHelper
.RestoreFlowDirection(comboBox, cell);
524
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.SelectedValuePathProperty, SelectedValuePathProperty);
525
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.DisplayMemberPathProperty, DisplayMemberPathProperty);
526
DataGridHelper
.SyncColumnProperty(this, comboBox, ComboBox.ItemsSourceProperty, ItemsSourceProperty);
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 (2)
618
private static readonly DependencyProperty FlowDirectionCacheProperty = DependencyProperty.Register("FlowDirectionCache", typeof(FlowDirection), typeof(
DataGridHelper
));
636
object flowDirectionObj = cell.ReadLocalValue(
DataGridHelper
.FlowDirectionCacheProperty);
src\Framework\System\Windows\Controls\DataGridHyperlinkColumn.cs (6)
188
DataGridHelper
.RestoreFlowDirection(outerBlock, cell);
203
DataGridHelper
.RestoreFlowDirection(textBox, cell);
257
DataGridHelper
.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null);
269
DataGridHelper
.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null);
284
if (
DataGridHelper
.HasNonEscapeCharacters(e as TextCompositionEventArgs))
288
else if (
DataGridHelper
.IsImeProcessed(e as KeyEventArgs))
src\Framework\System\Windows\Controls\DataGridRow.cs (34)
618
return
DataGridHelper
.GetCoercedTransferPropertyValue(
629
return
DataGridHelper
.GetCoercedTransferPropertyValue(
640
return
DataGridHelper
.GetCoercedTransferPropertyValue(
656
coercedValue =
DataGridHelper
.GetCoercedTransferPropertyValue(
665
coercedValue =
DataGridHelper
.GetCoercedTransferPropertyValue(
681
return
DataGridHelper
.GetCoercedTransferPropertyValue(
692
return
DataGridHelper
.GetCoercedTransferPropertyValue(
703
return
DataGridHelper
.GetCoercedTransferPropertyValue(
714
object visibility =
DataGridHelper
.GetCoercedTransferPropertyValue(
881
if (
DataGridHelper
.ShouldNotifyRows(target))
886
DataGridHelper
.TransferProperty(this, BackgroundProperty);
890
DataGridHelper
.TransferProperty(this, HeaderStyleProperty);
894
DataGridHelper
.TransferProperty(this, HeaderTemplateProperty);
898
DataGridHelper
.TransferProperty(this, HeaderTemplateSelectorProperty);
902
DataGridHelper
.TransferProperty(this, ValidationErrorTemplateProperty);
906
DataGridHelper
.TransferProperty(this, DetailsTemplateProperty);
907
DataGridHelper
.TransferProperty(this, DetailsVisibilityProperty);
911
DataGridHelper
.TransferProperty(this, DetailsTemplateSelectorProperty);
912
DataGridHelper
.TransferProperty(this, DetailsVisibilityProperty);
916
DataGridHelper
.TransferProperty(this, DetailsVisibilityProperty);
939
if (
DataGridHelper
.ShouldNotifyDetailsPresenter(target))
947
if (
DataGridHelper
.ShouldNotifyCellsPresenter(target) ||
948
DataGridHelper
.ShouldNotifyCells(target) ||
949
DataGridHelper
.ShouldRefreshCellContent(target))
958
if (
DataGridHelper
.ShouldNotifyRowHeaders(target) && RowHeader != null)
998
DataGridHelper
.TransferProperty(this, BackgroundProperty);
999
DataGridHelper
.TransferProperty(this, HeaderStyleProperty);
1000
DataGridHelper
.TransferProperty(this, HeaderTemplateProperty);
1001
DataGridHelper
.TransferProperty(this, HeaderTemplateSelectorProperty);
1002
DataGridHelper
.TransferProperty(this, ValidationErrorTemplateProperty);
1003
DataGridHelper
.TransferProperty(this, DetailsTemplateProperty);
1004
DataGridHelper
.TransferProperty(this, DetailsTemplateSelectorProperty);
1005
DataGridHelper
.TransferProperty(this, DetailsVisibilityProperty);
1337
return
DataGridHelper
.FindVisualParent<DataGridRow>(element);
src\Framework\System\Windows\Controls\DataGridTextColumn.cs (16)
92
DataGridHelper
.RestoreFlowDirection(textBlock, cell);
109
DataGridHelper
.RestoreFlowDirection(textBox, cell);
116
DataGridHelper
.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty);
117
DataGridHelper
.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty);
118
DataGridHelper
.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty);
119
DataGridHelper
.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty);
120
DataGridHelper
.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty);
136
DataGridHelper
.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty);
139
DataGridHelper
.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty);
142
DataGridHelper
.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty);
145
DataGridHelper
.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty);
148
DataGridHelper
.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty);
223
DataGridHelper
.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null);
235
DataGridHelper
.CacheFlowDirection(editingElement, editingElement != null ? editingElement.Parent as DataGridCell : null);
262
if (
DataGridHelper
.HasNonEscapeCharacters(e as TextCompositionEventArgs))
266
else if (
DataGridHelper
.IsImeProcessed(e as KeyEventArgs))
src\Framework\System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (15)
110
DataGridHelper
.TransferProperty(this, HeightProperty);
111
DataGridHelper
.TransferProperty(this, MinHeightProperty);
112
DataGridHelper
.TransferProperty(this, VirtualizingPanel.IsVirtualizingProperty);
202
return
DataGridHelper
.GetCoercedTransferPropertyValue(
213
return
DataGridHelper
.GetCoercedTransferPropertyValue(
385
if (
DataGridHelper
.ShouldNotifyCellsPresenter(target))
414
DataGridHelper
.TransferProperty(this, HeightProperty);
418
DataGridHelper
.TransferProperty(this, MinHeightProperty);
422
DataGridHelper
.TransferProperty(this, VirtualizingPanel.IsVirtualizingProperty);
426
if (
DataGridHelper
.ShouldNotifyCells(target) ||
427
DataGridHelper
.ShouldRefreshCellContent(target))
484
if (
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ true))
504
DataGridHelper
.TransferProperty(cellsPresenter, VirtualizingPanel.IsVirtualizingProperty);
517
return
DataGridHelper
.GetCoercedTransferPropertyValue(
621
get { return
DataGridHelper
.FindParent<DataGridRow>(this); }
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeader.cs (20)
114
DataGridHelper
.TransferProperty(this, ContentProperty);
115
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
116
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
117
DataGridHelper
.TransferProperty(this, ContentStringFormatProperty);
118
DataGridHelper
.TransferProperty(this, StyleProperty);
119
DataGridHelper
.TransferProperty(this, HeightProperty);
413
DataGridHelper
.OnColumnWidthChanged(this, e);
417
DataGridHelper
.TransferProperty(this, ContentProperty);
421
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
425
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
429
DataGridHelper
.TransferProperty(this, ContentStringFormatProperty);
433
DataGridHelper
.TransferProperty(this, StyleProperty);
437
DataGridHelper
.TransferProperty(this, HeightProperty);
612
object content =
DataGridHelper
.GetCoercedTransferPropertyValue(
637
return
DataGridHelper
.GetCoercedTransferPropertyValue(
651
return
DataGridHelper
.GetCoercedTransferPropertyValue(
665
return
DataGridHelper
.GetCoercedTransferPropertyValue(
696
return
DataGridHelper
.GetCoercedTransferPropertyValue(
806
return
DataGridHelper
.GetCoercedTransferPropertyValue(
913
Geometry frozenGeometry =
DataGridHelper
.GetFrozenClipForCell(header);
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (9)
78
DataGridHelper
.TransferProperty(this, VirtualizingPanel.IsVirtualizingProperty);
83
DataGridHelper
.TransferProperty(fillerColumnHeader, DataGridColumnHeader.StyleProperty);
84
DataGridHelper
.TransferProperty(fillerColumnHeader, DataGridColumnHeader.HeightProperty);
292
if (
DataGridHelper
.ShouldNotifyColumnHeadersPresenter(target))
329
DataGridHelper
.TransferProperty(this, VirtualizingPanel.IsVirtualizingProperty);
333
if (
DataGridHelper
.ShouldNotifyColumnHeaders(target))
377
DataGridHelper
.TransferProperty(headersPresenter, VirtualizingPanel.IsVirtualizingProperty);
390
return
DataGridHelper
.GetCoercedTransferPropertyValue(
1047
_parentDataGrid =
DataGridHelper
.FindParent<DataGrid>(this);
src\Framework\System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (12)
55
return
DataGridHelper
.GetCoercedTransferPropertyValue(
73
return
DataGridHelper
.GetCoercedTransferPropertyValue(
166
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
167
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
186
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
190
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
224
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ true))
227
Size desiredSize = base.MeasureOverride(
DataGridHelper
.SubtractFromSize(availableSize, thickness, /*height = */ true));
258
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ true))
261
Size returnSize = base.ArrangeOverride(
DataGridHelper
.SubtractFromSize(finalSize, thickness, /*height = */ true));
292
DataGridHelper
.IsGridLineVisible(dataGrid, /*isHorizontal = */ true))
328
get { return
DataGridHelper
.FindParent<DataGridRow>(this); }
src\Framework\System\Windows\Controls\Primitives\DataGridRowHeader.cs (16)
237
DataGridHelper
.TransferProperty(this, ContentProperty);
238
DataGridHelper
.TransferProperty(this, StyleProperty);
239
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
240
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
241
DataGridHelper
.TransferProperty(this, WidthProperty);
267
DataGridHelper
.TransferProperty(this, ContentProperty);
271
DataGridHelper
.TransferProperty(this, StyleProperty);
275
DataGridHelper
.TransferProperty(this, ContentTemplateProperty);
279
DataGridHelper
.TransferProperty(this, ContentTemplateSelectorProperty);
283
DataGridHelper
.TransferProperty(this, WidthProperty);
327
return
DataGridHelper
.GetCoercedTransferPropertyValue(
343
return
DataGridHelper
.GetCoercedTransferPropertyValue(
361
return
DataGridHelper
.GetCoercedTransferPropertyValue(
377
return
DataGridHelper
.GetCoercedTransferPropertyValue(
393
return
DataGridHelper
.GetCoercedTransferPropertyValue(
772
return
DataGridHelper
.FindParent<DataGridRow>(this);
src\Framework\System\Windows\Controls\Primitives\SelectiveScrollingGrid.cs (1)
60
ScrollViewer scrollViewer =
DataGridHelper
.FindVisualParent<ScrollViewer>(element);