Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetPagesVisibility and EnsureScrollBars issue #38

Open
BobLd opened this issue Nov 6, 2024 · 1 comment
Open

SetPagesVisibility and EnsureScrollBars issue #38

BobLd opened this issue Nov 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@BobLd
Copy link
Member

BobLd commented Nov 6, 2024

Following commit makes PdfPageItemsControl unstable: SetPagesVisibility and EnsureScrollBars do not behave properly in AOT dotnet8 (behaviour is not consistent over different builds...)

26dd7d5

The attempt to fix the problem in
6bb558f

    private void OnLayoutUpdated(object? sender, EventArgs e)
    {
        LayoutUpdated -= OnLayoutUpdated;

        Dispatcher.UIThread.Post(() =>
        {
            EnsureScrollBars();

            // Ensure the pages visibility is set when OnApplyTemplate()
            // is not called, i.e. when a new document is opened but the
            // page has exactly the same dimension of the visible page
            SetPagesVisibility();
        }, DispatcherPriority.Loaded);
    }

is still unstable.

Switching to dotnet9 looks to fix the problem (difficult to assess as problem is not consistent)

@BobLd BobLd changed the title SetPagesVisibility and EnsureScrollBars issue with AOT SetPagesVisibility and EnsureScrollBars issue Nov 9, 2024
@BobLd
Copy link
Member Author

BobLd commented Nov 9, 2024

Hack for scroll bars is linked to issue in avalonia, should be fixed when the following is merged

AvaloniaUI/Avalonia#17461

@BobLd BobLd added the bug Something isn't working label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant