79611502

Date: 2025-05-07 23:10:30
Score: 0.5
Natty:
Report link

Perhaps you should use a GridView instead? Set the Orientation to Vertical and the MaximumRowsOrColumns to 1 (weird name, but since it is vertical you can have multiple columns).

This will allow you to scroll horizontally using the mouse scrollwheel and change the selected item using the left/right keys or clicking.

<GridView x:Name="HorizontalList"
    ItemsSource="{x:Bind MyList, Mode=OneWay}"
    ScrollViewer.HorizontalScrollMode="Enabled"
    ScrollViewer.HorizontalScrollBarVisibility="Visible"
    ScrollViewer.VerticalScrollMode="Disabled"
    ScrollViewer.VerticalScrollBarVisibility="Hidden">
    <GridView.ItemsPanel>
        <ItemsPanelTemplate>
            <ItemsWrapGrid Orientation="Vertical"
                       MaximumRowsOrColumns="1" 
                ItemWidth="150"
                ItemHeight="150" />
        </ItemsPanelTemplate>
    </GridView.ItemsPanel>
</GridView>

enter image description here

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Abort_Retry