bhavan somanna
bhavan somanna

Reputation: 25

Not able to scroll an image Horizontally when zoomed in windows phone 8.1 U1

i have not able to achieve horizontally scroll zoomed image... vertical zoom is successful using this Xaml... Kindly help solving horizontal scroll of a zoomed image FOR windows phone 8.1 u1...

REGARDS

enter code here <Page
x:Class="Bus_Time.BasicPage1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Bus_Time"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Grid x:Name="LayoutRoot">
    <Grid.ChildrenTransitions>
        <TransitionCollection>
            <EntranceThemeTransition/>
        </TransitionCollection>
    </Grid.ChildrenTransitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <!-- Title Panel -->
    <StackPanel Grid.Row="0" Margin="19,0,0,0">
        <TextBlock Text="MY APPLICATION" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,12,0,0"/>
        <TextBlock Text="page title" Margin="0,-6.5,0,26.5" Style="{ThemeResource HeaderTextBlockStyle}" CharacterSpacing="{ThemeResource PivotHeaderItemCharacterSpacing}"/>
    </StackPanel>
    <Grid Margin="0,8.833,0,10" Grid.Row="1">
        <ScrollViewer   ZoomMode="Enabled"  MinZoomFactor="0.8" Height="Auto" Width="Auto">
            <StackPanel Height="Auto" Width="Auto" Orientation="Vertical"  ScrollViewer.HorizontalScrollMode="Enabled"  ScrollViewer.VerticalScrollMode="Enabled" HorizontalAlignment="Stretch">
                <Image Source="Assets/Image1/0001.jpg"  HorizontalAlignment="Stretch" Height="350" Width="380"/>
                <Image Source="Assets/Image1/0002.jpg" HorizontalAlignment="Stretch" Height="350" Width="300"/>
                <Image Source="Assets/Image1/0003.jpg" HorizontalAlignment="Stretch" Height="350" Width="380"/>
                <Image Source="Assets/Image1/0004.jpg" HorizontalAlignment="Stretch" Height="350" Width="380"/>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</Grid>

Upvotes: 1

Views: 443

Answers (1)

Eldar Dordzhiev
Eldar Dordzhiev

Reputation: 5135

Are you sure that the content doesn't fit in your ScrollViewer? Width of the images is 380, that's less than a page size for Windows and Windows Phone alike.

Anyway, you can try setting HorizontalScrollBarVisibility to Auto or Visible.

Upvotes: 1

Related Questions