Skip to content

Infinite scrolling #22

Description

@AngryCarrot789

I've managed to botch together infinite scrolling by making HexView.CanVerticallyScroll public and setting it to false, adding a handler for HexEditor.EffectiveViewportChanged which creates a new MemoryBinaryDocument with enough memory to fill the viewport (assuming a fixed line height of 14 pixels), and I use a custom OffsetColumn to add an additional offset to the text when the user scrolls up/down (by handling PointerWheelChangedEvent on the hex editor, using RoutingStrategies.Tunnel), to give the visual feedback that scrolling is happening, even though it technically isn't.

When the user actually scrolls, I schedule data to be read from a source, and when the read completes, it updates the document in the background, so when the user scrolls down, initially they will see 0s at the bottom until the background read operation completes. Perhaps it could instead read X amount of lines above and below the viewport?

While it sort of works, it would be nice to see official support added for this, since one problem I have is maintaining the caret position; I have to subtract the scroll offset from it, which works until the caret goes offscreen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions