I cannot determine how to scroll horizontally using the mouse wheel. Vertical scrolling works well automatically, but I need to scroll my content horizontally. My code looks like this:
<ListBox x:Name="receiptList"
Margin="5,0"
Grid.Row="1"
ItemTemplate="{StaticResource receiptListItemDataTemplate}"
ItemsSource="{Binding OpenReceipts}"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
ScrollViewer.HorizontalScrollBarVisibility="Visible"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListBox>
My item template looks like this:
<DataTemplate x:Key="receiptListItemDataTemplate">
<RadioButton GroupName="Numbers"
Command="{Binding Path=DataContext.SelectReceiptCommand,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type POS:PointOfSaleControl}}}"
CommandParameter="{Binding }"
Margin="2,0"
IsChecked="{Binding IsSelected}">
<RadioButton.Template>
<ControlTemplate TargetType="{x:Type RadioButton}" >
<Grid x:Name="receiptGrid" >
<Grid>
<Border BorderThickness="2"
BorderBrush="Green"
Height="20"
Width="20">
<Grid x:Name="radioButtonGrid"
Background="DarkOrange">
<TextBlock x:Name="receiptLabel"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Path=NumberInQueue, Mode=OneWay}"
FontWeight="Bold"
FontSize="12"
Foreground="White">
</TextBlock>
</Grid>
</Border>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Margin"
TargetName="receiptGrid"
Value="2,2,-1,-1"/>
<Setter Property="Background"
TargetName="radioButtonGrid"
Value="Maroon"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
Is there another method or control that I need to add to get that functionality?