VirtualizingStackPanel
struct · ferroui-controls · v0.5.0
struct VirtualizingStackPanel
Arranges and virtualizes content on a single line that is oriented either horizontally or vertically.
Members
TYPEto_reforientation_propertyare_horizontal_snap_points_regular_propertyare_vertical_snap_points_regular_propertyhorizontal_snap_points_changed_eventvertical_snap_points_changed_eventcache_length_propertyconstructneworientationset_orientationhorizontal_snap_points_changedvertical_snap_points_changedare_horizontal_snap_points_regularset_are_horizontal_snap_points_regularare_vertical_snap_points_regularset_are_vertical_snap_points_regularcache_lengthset_cache_lengthfirst_realized_indexlast_realized_indexget_irregular_snap_pointsget_regular_snap_points
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<VirtualizingStackPanel>
Returns a strong reference to this object.
orientation_property
fn orientation_property() -> &'static StyledProperty<Orientation>
Defines the Orientation property.
are_horizontal_snap_points_regular_property
fn are_horizontal_snap_points_regular_property() -> &'static StyledProperty<bool>
Defines the AreHorizontalSnapPointsRegular property.
are_vertical_snap_points_regular_property
fn are_vertical_snap_points_regular_property() -> &'static StyledProperty<bool>
Defines the AreVerticalSnapPointsRegular property.
horizontal_snap_points_changed_event
fn horizontal_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the HorizontalSnapPointsChanged event.
vertical_snap_points_changed_event
fn vertical_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the VerticalSnapPointsChanged event.
cache_length_property
fn cache_length_property() -> &'static StyledProperty<f64>
Defines the CacheLength property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
orientation
fn orientation(self: &Self) -> Orientation
Gets or sets the axis along which items are laid out.
One of the enumeration values that specifies the axis along which items are laid out. The default is vertical.
set_orientation
fn set_orientation(self: &Self, value: Orientation)
horizontal_snap_points_changed
fn horizontal_snap_points_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the measurements for horizontal snap points change.
vertical_snap_points_changed
fn vertical_snap_points_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the measurements for vertical snap points change.
are_horizontal_snap_points_regular
fn are_horizontal_snap_points_regular(self: &Self) -> bool
Gets or sets whether the horizontal snap points for the
VirtualizingStackPanel are equidistant from each other.
set_are_horizontal_snap_points_regular
fn set_are_horizontal_snap_points_regular(self: &Self, value: bool)
are_vertical_snap_points_regular
fn are_vertical_snap_points_regular(self: &Self) -> bool
Gets or sets whether the vertical snap points for the
VirtualizingStackPanel are equidistant from each other.
set_are_vertical_snap_points_regular
fn set_are_vertical_snap_points_regular(self: &Self, value: bool)
cache_length
fn cache_length(self: &Self) -> f64
Gets or sets the cache length.
The factor determines how much additional space to maintain above and below the viewport. A value of 0.5 means half the viewport size will be buffered on each side (up-down or left-right). This uses more memory as more UI elements are realized, but greatly reduces the number of measure-arrange cycles which can cause heavy memory pressure depending on the complexity of the item layouts.
set_cache_length
fn set_cache_length(self: &Self, value: f64)
first_realized_index
fn first_realized_index(self: &Self) -> i32
Gets the index of the first realized element, or -1 if no elements are realized.
last_realized_index
fn last_realized_index(self: &Self) -> i32
Gets the index of the last realized element, or -1 if no elements are realized.
get_irregular_snap_points
fn get_irregular_snap_points(self: &Self, orientation: Orientation, snap_points_alignment: SnapPointsAlignment) -> Vec<f64>
Returns the set of distances between irregular snap points for a specified orientation and alignment.
get_regular_snap_points
fn get_regular_snap_points(self: &Self, _orientation: Orientation, snap_points_alignment: SnapPointsAlignment) -> (f64, f64)
Gets the distance between regular snap points for a specified orientation and alignment, and the offset of the first snap point.
Panics if the snap points of the panel's orientation are not regular.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeControlImplExtPanelImplExtVirtualizingPanelImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<VirtualizingStackPanel>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplControlImplPanelImplInputElementImplFerroObjectImplLayoutableImplVisualImplVirtualizingPanelImplIScrollSnapPointsInfo
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.