Problem with ListBox scrolling
Posted: 28 Mar 2024, 08:53
Hi all.
I have ListBox scrolling with the mouse wheel not working unless the cursor is over the ListBoxItem area.
Example:
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.
I have ListBox scrolling with the mouse wheel not working unless the cursor is over the ListBoxItem area.
Example:
Code: Select all
<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>
What did I do wrong? Noesis version 3.1.5. In Wpf, everything works correctly.