BinaryVirtualizingWrapPanel
A class that behaves like a WrapPanel control, with additional ability out-of-the-box scrolling and being able to automatically virtualize/realize the content.
public class BinaryVirtualizingWrapPanel : VirtualizingPanel, IScrollInfo, ISupportTransactionalUpdates
Inherits from / implements: VirtualizingPanel, IScrollInfo, ISupportTransactionalUpdates
Remarks
The virtualization will have any effect only when the content items are retrieved by data-binding.
Important note: Please note that at this time of release, the BinaryVirtualizingWrapPanel control does not support its functionality when the root element in the window is a StackPanel control.
In order to work with this control, please consider using other panels (such as WrapPanel, DockPanel or others) as your Window's Root element .
Members at a glance
BinaryVirtualizingWrapPanel | Initializes a new instance of the BinaryVirtualizingWrapPanel class. |
AutoUpdateViewportOnDetectingTransactionalUpdatesToDataSource | Gets or sets a value indicating whether [automatic update viewport on detecting transactional updates to data source]. |
CanHorizontallyScroll | Gets or sets a value that indicates whether scrolling on the horizontal axis is possible. |
CanVerticallyScroll | Gets or sets a value that indicates whether scrolling on the vertical axis is possible. |
CustomExtraSpacingBetweenGroupHeaderRowAndDataItemRow | Gets or sets a custom extra spacing to render between the group header row and the data item row. |
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBegins | Gets or sets the custom extra spacing to render between where a group rendering completes and the next group header row rendering begins. |
DesiredChildIndexScrollingIsDataContextSynchronized | Gets or sets whether the control's DesiredChildIndexToScrollTo is set to be synchronized with the current item in the data context. |
DesiredChildIndexToScrollTo | Gets or sets the desired child index to scroll to. |
ExtentHeight | Gets the vertical size of the extent. |
ExtentWidth | Gets the horizontal size of the extent. |
GroupHeaderItemCustomHeight | Gets or sets a custom height when rendering the group header using a custom Datatemplate. |
GroupVirtualizationMode | Gets or sets the virtualization mode when grouping is enabled on the data source. |
HorizontalOffset | Gets the horizontal offset of the scrolled content. |
IsAnimationEnabled | Gets or sets a value indicating whether this instance is animation enabled. |
IsAnimationEnabledWhenScrollToASpecificChildIndex | Gets or sets a value indicating whether this instance is animation enabled for deterministically scrolling to a specific child index. |
IsDataSourceGrouped | Gets or sets whether the data source of the items control is set up with grouping information. |
IsDynamicConstructionCapabilityEnabled | Gets or sets a value indicating whether this instance is dynamic construction capability enabled. |
IsExtraMarginAtStartupRequired | Gets or sets a value indicating whether this instance is extra margin at startup required. |
IsRenderItemDimensionHeightSpacingBetweenGroupHeaderAndDataItemRowEnabled | Gets or sets whether to render spacing between the group header and data item row. |
IsTrimExtraLinkbreakForLeadingRowWithOneChildEnabled | Gets or sets whether to automatically trim the extra leading space between header and row data if there is only one child per row that is being rendered. |
ItemDimension | Gets or sets the size of the content items. |
ItemPositioningMode | Gets or sets the item positioning mode. |
Orientation | Gets or sets the orientation for laying-out the children items. |
PanelAnimationEffect | Gets or sets the panel animation effect. |
ReRenderVisibilityRangeMaxCount | Gets or sets the maximum number of items that the control has to prepare when about to re-render the viewport due to a trigger to the view invalidation. |
RendertimeMargin | Gets or sets the rendertime margin. |
ScrollOwner | Gets or sets a ScrollViewer element that controls scrolling behavior. |
ShouldAdjustRightHorizontalAlignmentSetupConsideringScrollInfo | Gets or sets a value indicating whether the control should adjust right horizontal alignment margin setup considering the host ItemsControl scrollbar visual. |
ShouldAutoAdjustParentItemsControlInternalPadding | Gets or sets whether the component should automatically adjust the internal padding setup in the Control styles of the owner ItemsControl. |
ShouldRecomputeViewportExtentSpacingUponAlignment | Gets or sets a value indicating whether the control should recompute the viewport vis-a-vis extent spacing upon alignment. |
ShouldRenderExtraLineBeforeHeader | Gets or sets a value indicating whether the control should render an extra line before header in standalone line rendering mode. |
ShouldRenderItemHeightSpacingAfterAGroupHasBeenRendered | Gets or sets a value indicating whether the control should render an item height worth of spacing after a group has been rendered. |
ShouldShareUnusedSpaceEquallyOnHorizontalAlignment | Gets or sets a value indicating whether the control should share unused space equally on horizontal alignment. |
ShouldUseRenderTimeMarginValuesWhenRecomputingViewPortExtentSpacingAdjustment | Gets or sets a value indicating whether the control should use the value set for RendertimeMargin relevant values when recomputing view port extent spacing adjustment for the property ShouldRecomputeViewportExtentSpacingUponAlignment. |
VerticalOffset | Gets the vertical offset of the scrolled content. |
ViewportHeight | Gets the vertical size of the viewport for this content. |
ViewportWidth | Gets the horizontal size of the viewport for this content. |
VirtualizationSchemeOption | Gets or sets the virtualization scheme. |
VirtualizationSchemeWhenScrollingToASpecificChildIndex | Gets or sets the VirtualizationScheme to use, when scrolling to a specific child. |
ArrangeOverride | When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class. |
LineDown | Scrolls down within content by one logical unit. |
LineLeft | Scrolls left within content by one logical unit. |
LineRight | Scrolls right within content by one logical unit. |
LineUp | Scrolls up within content by one logical unit. |
MakeVisible | This method is not available in the Virtualization scenario. |
MeasureOverride | When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class. |
MouseWheelDown | Scrolls down within content after a user clicks the wheel button on a mouse. |
MouseWheelLeft | Scrolls left within content after a user clicks the wheel button on a mouse. |
MouseWheelRight | Scrolls right within content after a user clicks the wheel button on a mouse. |
MouseWheelUp | Scrolls up within content after a user clicks the wheel button on a mouse. |
OnItemsChanged | Called when the Items collection that is associated with the ItemsControl for this Panel changes. |
OnKeyDown | Invoked when an unhandled KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. |
OnRenderSizeChanged | Raises the SizeChanged event, using the specified information as part of the eventual event data. |
PageDown | Scrolls down within content by one page. |
PageLeft | Scrolls left within content by one page. |
PageRight | Scrolls right within content by one page. |
PageUp | Scrolls up within content by one page. |
Refresh | Performs deterministic update of the virtualized viewport data. An implementation for Refresh. |
ScrollToTheDesiredChild | Scrolls to the desired child. |
SetHorizontalOffset | Sets the amount of horizontal offset. |
SetVerticalOffset | Sets the amount of vertical offset. |
AboutToRenderChildItems | Raised when the control is about to render / display the items in the viewport. |
CustomExtraSpacingBetweenGroupHeaderRowAndDataItemRowProperty | The custom extra spacing between group header row and data item row property |
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBeginsProperty | The custom extra spacing between group rendering completion and group header row rendering begins property |
DesiredChildIndexScrollingIsDataContextSynchronizedProperty | The desired child index scrolling is data context synchronized property |
DesiredChildIndexToScrollToProperty | DesiredChildIndexToScrollToProperty property. |
GroupHeaderItemCustomHeightProperty | The group header item custom height property |
GroupVirtualizationModeProperty | Gets or sets the virtualization mode when grouping is enabled on the data source. |
IsAnimationEnabledProperty | IsAnimationEnabledProperty property. |
IsAnimationEnabledWhenScrollToASpecificChildIndexProperty | IsAnimationEnabledForDeterministicScrollToASpecificChildIndexProperty property. |
IsDataSourceGroupedProperty | Gets or sets whether the data source of the items control is set up with grouping information. |
IsDynamicConstructionCapabilityEnabledProperty | The is dynamic construction capability enabled property |
IsExtraMarginAtStartupRequiredProperty | The is extra margin at startup required property |
IsRenderItemDimensionHeightSpacingBetweenGroupHeaderAndDataItemRowEnabledProperty | The is render item dimension height spacing between group header and data item row enabled property |
IsTrimExtraLinkbreakForFirstRowEnabledProperty | The is trim extra linkbreak for first row enabled property |
ItemDimensionProperty | ItemDimensionProperty property. |
ItemPositioningModeProperty | The item positioning mode property |
OrientationProperty | OrientationProperty property. |
PanelAnimationEffectProperty | PanelAnimationEffectProperty property. |
ReRenderVisibilityRangeMaxCountProperty | The re render visibility range maximum count property |
RendertimeMarginProperty | The rendertime margin property |
ShouldAutoAdjustParentItemsControlInternalPaddingProperty | Identifies the ShouldAutoAdjustParentItemsControlInternalPadding dependency property. |
ShouldRenderExtraLineBeforeHeaderProperty | Gets or sets a value indicating whether the control should render an extra line before header in standalone line rendering mode. |
ShouldRenderItemHeightSpacingAfterAGroupHasBeenRenderedProperty | The should render item height spacing after a group has been rendered property |
VirtualizationSchemeOptionProperty | VirtualizationSchemeOptionProperty property. |
VirtualizationSchemeWhenScrollingToASpecificChildIndexProperty | VirtualizationSchemeWhenScrollingToASpecificChildIndexProperty property. |
Constructors
BinaryVirtualizingWrapPanel
Initializes a new instance of the BinaryVirtualizingWrapPanel class.
Properties
AutoUpdateViewportOnDetectingTransactionalUpdatesToDataSource
Gets or sets a value indicating whether [automatic update viewport on detecting transactional updates to data source].
Value. true if [automatic update viewport on detecting transactional updates to data source]; otherwise, false .
CanHorizontallyScroll
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Value. true if this instance can horizontally scroll; otherwise, false .
CanVerticallyScroll
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Value. true if this instance can vertically scroll; otherwise, false .
CustomExtraSpacingBetweenGroupHeaderRowAndDataItemRow
Gets or sets a custom extra spacing to render between the group header row and the data item row.
Value. The custom extra spacing between group header row and data item row.
IsRenderItemDimensionHeightSpacingBetweenGroupHeaderAndDataItemRowEnabled to false, then this automatic spacing will not be rendered. In that case, the control will just render a default spacing of 4 DIP units between group header row and the data item row. You can customize this value using this property and set your own custom pixel units value as the spacing.
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBegins
Gets or sets the custom extra spacing to render between where a group rendering completes and the next group header row rendering begins.
Value. The custom extra spacing between group rendering completion and group header row rendering begins.
ShouldRenderItemHeightSpacingAfterAGroupHasBeenRendered is set to false. By default the value of this property is set to 48.0.
Note that the maximum value this property can be set to is 80% of the
ItemDimension's Height value.DesiredChildIndexScrollingIsDataContextSynchronized
Gets or sets whether the control's DesiredChildIndexToScrollTo is set to be synchronized with the current item in the data context.
Value. true if [desired child index scrolling is data context synchronized]; otherwise, false .
DesiredChildIndexToScrollTo
Gets or sets the desired child index to scroll to.
Value. The desired child index to scroll to.
ExtentHeight
Gets the vertical size of the extent.
Value. The height of the extent.
ExtentWidth
Gets the horizontal size of the extent.
Value. The width of the extent.
GroupHeaderItemCustomHeight
Gets or sets a custom height when rendering the group header using a custom Datatemplate.
Value. The height of the group header item custom.
GroupVirtualizationMode
Gets or sets the virtualization mode when grouping is enabled on the data source.
Value. The group virtualization mode.
HorizontalOffset
Gets the horizontal offset of the scrolled content.
Value. The horizontal offset.
IsAnimationEnabled
Gets or sets a value indicating whether this instance is animation enabled.
Value. true if this instance is animation enabled; otherwise, false .
IsAnimationEnabledWhenScrollToASpecificChildIndex
Gets or sets a value indicating whether this instance is animation enabled for deterministically scrolling to a specific child index.
Value. true if this instance is animation enabled when scroll to a specific child index; otherwise, false .
IsDataSourceGrouped
Gets or sets whether the data source of the items control is set up with grouping information.
Value. true if this instance is data source grouped; otherwise, false .
IsDynamicConstructionCapabilityEnabled
Gets or sets a value indicating whether this instance is dynamic construction capability enabled.
Value. true if this instance is dynamic construction capability enabled; otherwise, false .
IsExtraMarginAtStartupRequired
Gets or sets a value indicating whether this instance is extra margin at startup required.
Value. true if for this instance, the extra margin at startup is required; otherwise, false .
IsRenderItemDimensionHeightSpacingBetweenGroupHeaderAndDataItemRowEnabled
Gets or sets whether to render spacing between the group header and data item row.
Value. true if this instance is render item dimension height spacing between group header and data item row enabled; otherwise, false .
ItemDimension property.IsTrimExtraLinkbreakForLeadingRowWithOneChildEnabled
Gets or sets whether to automatically trim the extra leading space between header and row data if there is only one child per row that is being rendered.
Value. true if this instance is trim extra linkbreak for leading row with one child enabled; otherwise, false .
ItemDimension
Gets or sets the size of the content items.
Value. The size of the item.
ItemPositioningMode
Gets or sets the item positioning mode.
Value. The item positioning mode.
Orientation
Gets or sets the orientation for laying-out the children items.
Value. The orientation.
PanelAnimationEffect
Gets or sets the panel animation effect.
Value. The AnimationEffect.
ReRenderVisibilityRangeMaxCount
Gets or sets the maximum number of items that the control has to prepare when about to re-render the viewport due to a trigger to the view invalidation.
Value. The re render visibility range maximum count.
RendertimeMargin
Gets or sets the rendertime margin.
Value. The rendertime margin.
ScrollOwner
Gets or sets a ScrollViewer element that controls scrolling behavior.
Value. The scroll owner.
ShouldAdjustRightHorizontalAlignmentSetupConsideringScrollInfo
Gets or sets a value indicating whether the control should adjust right horizontal alignment margin setup considering the host ItemsControl scrollbar visual.
Value. true if [should adjust right horizontal alignment setup considering scroll information]; otherwise, false .
ShouldAutoAdjustParentItemsControlInternalPadding
Gets or sets whether the component should automatically adjust the internal padding setup in the Control styles of the owner ItemsControl.
ShouldRecomputeViewportExtentSpacingUponAlignment
Gets or sets a value indicating whether the control should recompute the viewport vis-a-vis extent spacing upon alignment.
Value. true if [should recompute viewport extent spacing upon alignment]; otherwise, false .
ShouldRenderExtraLineBeforeHeader
Gets or sets a value indicating whether the control should render an extra line before header in standalone line rendering mode.
Value. true if [should render extra line before header]; otherwise, false .
ShouldRenderItemHeightSpacingAfterAGroupHasBeenRendered
Gets or sets a value indicating whether the control should render an item height worth of spacing after a group has been rendered.
Value. true if [should render item height spacing after a group has been rendered]; otherwise, false .
ItemDimension Height value worth of spacing between where a group rendering completes, and where the next row header is about to be rendered. If you switch this property to true, then ensure to set a custom value for the property
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBegins. By default the value of the property
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBegins is set to 48.0.ShouldUseRenderTimeMarginValuesWhenRecomputingViewPortExtentSpacingAdjustment
Gets or sets a value indicating whether the control should use the value set for RendertimeMargin relevant values when recomputing view port extent spacing adjustment for the property ShouldRecomputeViewportExtentSpacingUponAlignment.
Value. true if [should use render time margin values when recomputing view port extent spacing adjustment]; otherwise, false .
VerticalOffset
Gets the vertical offset of the scrolled content.
Value. The vertical offset.
ViewportHeight
Gets the vertical size of the viewport for this content.
Value. The height of the viewport.
ViewportWidth
Gets the horizontal size of the viewport for this content.
Value. The width of the viewport.
VirtualizationSchemeOption
Gets or sets the virtualization scheme.
Value. The virtualization scheme.
IsDataSourceGrouped is set to true, the only VirtualizationScheme value you can use is VirtualizationScheme.LightWeightCache.VirtualizationSchemeWhenScrollingToASpecificChildIndex
Gets or sets the VirtualizationScheme to use, when scrolling to a specific child.
Value. The index of the virtualization scheme when scrolling to a specific child.
Methods
ArrangeOverride
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
- finalSize
- The final area within the parent that this element should use to arrange itself and its children.
Returns. The actual size used.
LineDown
Scrolls down within content by one logical unit.
LineLeft
Scrolls left within content by one logical unit.
LineRight
Scrolls right within content by one logical unit.
LineUp
Scrolls up within content by one logical unit.
MakeVisible
This method is not available in the Virtualization scenario.
- visual
- A
Visualthat becomes visible. - rectangle
- A bounding rectangle that identifies the coordinate space to make visible.
Returns. A Rect that is visible.
MeasureOverride
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
- availableSize
- The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.
Returns. The size that this element determines it needs during layout, based on its calculations of child element sizes.
MouseWheelDown
Scrolls down within content after a user clicks the wheel button on a mouse.
MouseWheelLeft
Scrolls left within content after a user clicks the wheel button on a mouse.
MouseWheelRight
Scrolls right within content after a user clicks the wheel button on a mouse.
MouseWheelUp
Scrolls up within content after a user clicks the wheel button on a mouse.
OnItemsChanged
Called when the Items collection that is associated with the ItemsControl for this Panel changes.
- sender
- The
Objectthat raised the event. - args
- Provides data for the
ItemsChangedevent.
OnKeyDown
Invoked when an unhandled KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
- e
- The
KeyEventArgsthat contains the event data.
OnRenderSizeChanged
Raises the SizeChanged event, using the specified information as part of the eventual event data.
- sizeInfo
- Details of the old and new size involved in the change.
PageDown
Scrolls down within content by one page.
PageLeft
Scrolls left within content by one page.
PageRight
Scrolls right within content by one page.
PageUp
Scrolls up within content by one page.
Refresh
Performs deterministic update of the virtualized viewport data. An implementation for Refresh.
ScrollToTheDesiredChild
Scrolls to the desired child.
- desiredChildIndexToScrollTo
- The desired child index to scroll to.
- performAnimation
- if set to true [perform animation].
- virtualizationScheme
- The desired
VirtualizationScheme.
SetHorizontalOffset
Sets the amount of horizontal offset.
- offset
- The degree to which content is horizontally offset from the containing viewport.
SetVerticalOffset
Sets the amount of vertical offset.
- offset
- The degree to which content is vertically offset from the containing viewport.
Events
AboutToRenderChildItems
Raised when the control is about to render / display the items in the viewport.
Fields
CustomExtraSpacingBetweenGroupHeaderRowAndDataItemRowProperty
The custom extra spacing between group header row and data item row property
CustomExtraSpacingBetweenGroupRenderingCompletionAndGroupHeaderRowRenderingBeginsProperty
The custom extra spacing between group rendering completion and group header row rendering begins property
DesiredChildIndexScrollingIsDataContextSynchronizedProperty
The desired child index scrolling is data context synchronized property
DesiredChildIndexToScrollToProperty
DesiredChildIndexToScrollToProperty property.
GroupHeaderItemCustomHeightProperty
The group header item custom height property
GroupVirtualizationModeProperty
Gets or sets the virtualization mode when grouping is enabled on the data source.
IsAnimationEnabledProperty
IsAnimationEnabledProperty property.
IsAnimationEnabledWhenScrollToASpecificChildIndexProperty
IsAnimationEnabledForDeterministicScrollToASpecificChildIndexProperty property.
IsDataSourceGroupedProperty
Gets or sets whether the data source of the items control is set up with grouping information.
IsDynamicConstructionCapabilityEnabledProperty
The is dynamic construction capability enabled property
IsExtraMarginAtStartupRequiredProperty
The is extra margin at startup required property
IsRenderItemDimensionHeightSpacingBetweenGroupHeaderAndDataItemRowEnabledProperty
The is render item dimension height spacing between group header and data item row enabled property
IsTrimExtraLinkbreakForFirstRowEnabledProperty
The is trim extra linkbreak for first row enabled property
ItemDimensionProperty
ItemDimensionProperty property.
Value. The size of the item.
ItemPositioningModeProperty
The item positioning mode property
OrientationProperty
OrientationProperty property.
PanelAnimationEffectProperty
PanelAnimationEffectProperty property.
ReRenderVisibilityRangeMaxCountProperty
The re render visibility range maximum count property
RendertimeMarginProperty
The rendertime margin property
ShouldAutoAdjustParentItemsControlInternalPaddingProperty
Identifies the ShouldAutoAdjustParentItemsControlInternalPadding dependency property.
ShouldRenderExtraLineBeforeHeaderProperty
Gets or sets a value indicating whether the control should render an extra line before header in standalone line rendering mode.
ShouldRenderItemHeightSpacingAfterAGroupHasBeenRenderedProperty
The should render item height spacing after a group has been rendered property
VirtualizationSchemeOptionProperty
VirtualizationSchemeOptionProperty property.
VirtualizationSchemeWhenScrollingToASpecificChildIndexProperty
VirtualizationSchemeWhenScrollingToASpecificChildIndexProperty property.