FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    VirtualizingStackPanel

    struct · ferroui-controls · v0.5.0

    struct VirtualizingStackPanel
    

    Arranges and virtualizes content on a single line that is oriented either horizontally or vertically.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<VirtualizingStackPanel>
    

    Returns a strong reference to this object.

    Source

    orientation_property

    fn orientation_property() -> &'static StyledProperty<Orientation>
    

    Defines the Orientation property.

    Source

    are_horizontal_snap_points_regular_property

    fn are_horizontal_snap_points_regular_property() -> &'static StyledProperty<bool>
    

    Defines the AreHorizontalSnapPointsRegular property.

    Source

    are_vertical_snap_points_regular_property

    fn are_vertical_snap_points_regular_property() -> &'static StyledProperty<bool>
    

    Defines the AreVerticalSnapPointsRegular property.

    Source

    horizontal_snap_points_changed_event

    fn horizontal_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the HorizontalSnapPointsChanged event.

    Source

    vertical_snap_points_changed_event

    fn vertical_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the VerticalSnapPointsChanged event.

    Source

    cache_length_property

    fn cache_length_property() -> &'static StyledProperty<f64>
    

    Defines the CacheLength property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    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.

    Source

    set_orientation

    fn set_orientation(self: &Self, value: Orientation)
    

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    set_are_horizontal_snap_points_regular

    fn set_are_horizontal_snap_points_regular(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_are_vertical_snap_points_regular

    fn set_are_vertical_snap_points_regular(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_cache_length

    fn set_cache_length(self: &Self, value: f64)
    

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.