Search code examples
c#wpfimagescrollviewerstackpanel

WPF select item in a scroll viewer


I have a ScrollViewer with a StackPanel that contains images. Is it possible to select items in the ScrollViewer/StackPanel?

<ScrollViewer x:Name="Gallery" Grid.Column="1"  Grid.Row="0"   
        HorizontalScrollBarVisibility="Hidden" 
        VerticalScrollBarVisibility="Visible" >
    <StackPanel x:Name="GalleryStack"/>
</ScrollViewer>

Solution

  • How exactly? why not use a Listbox?