here im using telerik radlistbox, inside list box was not working, i tried using a parent control but it has no use...try to get me some idea to work inside a lstbox scroll.
Note : attached the o/p file
XAML CODE:
<UserControl x:Class="View.RoomTemplate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:View"
xmlns:vm="clr-namespace:ViewModel"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800">
<UserControl.Resources>
<ObjectDataProvider x:Key="RoomTemplateViewModel" ObjectType="{x:Type vm:RoomTemplateViewModel}"
MethodName="GetInstance"/>
</UserControl.Resources>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" >
<Grid DataContext="{StaticResource RoomTemplateViewModel}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5"/>
<ColumnDefinition MinWidth="200"/>
<ColumnDefinition MinWidth="200"/>
<ColumnDefinition Width="5"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="5"/>
<RowDefinition MinHeight="350"/>
<RowDefinition Height="50"/>
<RowDefinition MinHeight="50"/>
<RowDefinition Height="20"/>
<RowDefinition MinHeight="50"/>
<RowDefinition Height="5"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:Room x:Name="RoomView" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" />
<Label FontWeight="Bold" FontSize="20" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Content="Available Rooms" />
<telerik:RadListBox Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2" ItemsSource="{Binding RoomsList}" HorizontalAlignment="Left" Name="ListRooms" ScrollViewer.VerticalScrollBarVisibility="Visible" PreviewMouseWheel="RoomView_OnPreviewMouseWheel">
<telerik:RadListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</telerik:RadListBox.ItemsPanel>
<telerik:RadListBox.ItemTemplate>
<DataTemplate >
<StackPanel>
<CheckBox Content="{Binding RoomInformation[0].RoomNumber}" IsChecked="{Binding RoomInformation[0].RoomChecked}"/>
</StackPanel>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
</telerik:RadListBox>
<StackPanel Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox IsThreeState="False" Content="Select All" IsChecked="{Binding SelectAllCheck}" Command="{Binding SelectAllCommand}"/>
<Button Margin="15,0,0,0" Height="25" Width="100" Content="Apply" Command="{Binding ApplySettingCommand}"></Button>
</StackPanel>
</Grid>
</ScrollViewer>
</UserControl>
C# CODE:
private void RoomView_OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)