我无法实现水平滚动缩放图像...垂直缩放使用此Xaml成功...请帮助解决缩放图像的水平滚动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>
答案 0 :(得分:1)
您确定内容不适合您的ScrollViewer吗?图像的宽度为380,小于Windows和Windows Phone的页面大小。
无论如何,您可以尝试将HorizontalScrollBarVisibility
设为Auto
或Visible
。