Search code examples
scrollviewer

adding pictures into scroll viewer


how can i add pictures into scroll viewer in C#?


Solution

  • Something like this (ScrollViewer doc):

    <ScrollViewer Height="200" Width="200" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Canvas.Top="60" Canvas.Left="340">
         <Image src="myImage.jpg" Width="50" Height="50" />
    </ScrollViewer>
    

    But you might also want to check out the StackPanel control.