Page 1 of 1

Problem with ListBox scrolling

Posted: 28 Mar 2024, 08:53
by vinick
Hi all.
I have ListBox scrolling with the mouse wheel not working unless the cursor is over the ListBoxItem area.
Example:
    <Page.Resources>
        <Style x:Key="ListItemSt" 
               TargetType="ListBoxItem"> 
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Grid x:Name="ItemGrid" Background="Yellow" Margin="20">
                            <TextBlock Text="1" Foreground="Black"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>
    <Grid Background="Wheat">
        <ListBox ItemContainerStyle="{StaticResource ListItemSt}">
            <ListBoxItem>1</ListBoxItem>
            <ListBoxItem>2</ListBoxItem>
            <ListBoxItem>3</ListBoxItem>
	<!-- more items -->
        </ListBox> 
    </Grid>
If I remove the Margin field in "ItemGrid" the scrolling works, otherwise it only works if the mouse pointer is over the TextBlock.
What did I do wrong? Noesis version 3.1.5. In Wpf, everything works correctly.

Re: Problem with ListBox scrolling

Posted: 28 Mar 2024, 12:44
by sfernandez
Could you try to set the background of the ListBox to Transparent?
<ListBox Background="Transparent">
I think the problem is that our ListBox default style does not set it, we will fix it.