Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

ScrollView cannot contain other layouts and ListBoxes

Open hui3215 opened this issue 1 year ago • 1 comments

Describe the bug When the layout is as follows the code below, the rendering of the program has problems

To Reproduce A black bar appears for page rendering when sliding

 <ScrollViewer >
        <StackPanel>
            <TextBlock Text="Avalonia" Width="600" Height="400" Background="pink"></TextBlock>
            <ListBox Items="{Binding Type}">
            </ListBox>
        </StackPanel>
    </ScrollViewer>

Expected behavior Normal sliding without black areas

Screenshots QQ截图20220905151604

Desktop (please complete the following information):

  • OS: Ubuntu 22
  • Version 0.10.18

Additional context

hui3215 avatar Sep 05 '22 07:09 hui3215

Probably you need Wayland support which is WIP? See #8352

Maybe you can try out the linked PR directly and see if your issue would be solved?

timunie avatar Sep 05 '22 08:09 timunie

Tested on my machine. Works with no issues as you have. Can you test the same code on another machine? Or try it with 11.0 preview? Also, keep in mind that ListBox inside of another ScrollViewer won't work very well with virtualization.

maxkatz6 avatar Sep 26 '22 22:09 maxkatz6