forum

home / developersection / forums / scrollviewer does not scroll image wpf

ScrollViewer does not scroll Image WPF

Anonymous User 3054 30-Jan-2014

I have an image that is bigger than it's window container and it is placed in a ScrollViewer, however, the image does not scroll at all. I've tried putting the image in a container with no luck. What settings am I missing here? (I copied the code straight from MS, but they have it wrong)

Here's the code:

<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:h="http://helixtoolkit.codeplex.com" x:Class="TileLayout"
Title="TileLayout" Height="1000" Width="845" WindowStartupLocation="CenterScreen" WindowStyle="ThreeDBorderWindow">
<StackPanel HorizontalAlignment="center" VerticalAlignment="Top">
    <StackPanel Orientation="Horizontal"   >
        <TextBox x:Name="txtSourceFilePath" Width="500" Margin="10" Height="22" TextChanged="TextBoTextChanged" Text="E:\projects\Test3D\SavedSnapshots\snapshot.png"/>
        <Button x:Name="btnPickFile" Width="100" Margin="0,10,10,10" Content="Pick File" ></Button>
    </StackPanel>
    <ScrollViewer VerticalScrollBarVisibility="Auto" >
        <Image x:Name="imgFinal" Source="SteelMotion_chevron2.png"/>
    </ScrollViewer>
</StackPanel>

c# c# 
Updated on 30-Jan-2014

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By