【发布时间】:2016-01-20 17:41:02
【问题描述】:
我真的希望我在这里没有做一些愚蠢的事情,但我正在尝试制作一个(快速?)UWP Windows 10 测试应用程序,其中包括一个 ScrollViewer 来进行图像滚动。 ScrollViewer 工作正常,直到我尝试使用 PanningMode,它只是说它不存在。我看到另一篇 PanningMode="Both" 不起作用的帖子,但这丝毫没有帮助,没有解决我遇到的问题。是我很愚蠢,比如 PanningMode 由于某种原因不存在,还是有什么不对劲?这是我的 MainPage.xaml(虽然目前没有优化或按照任何实际标准制作),我希望它已经足够了。
<Page
x:Class="NewLunderground.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:NewLunderground"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer x:Name="ScrollusViewus" HorizontalAlignment="Left" VerticalAlignment="Top" ZoomMode="Enabled" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Visible" PanningMode="Both" Height="Auto" Width="Auto">
<Image x:Name="mapImage" HorizontalAlignment="Left" VerticalAlignment="Top" Source="Assets/map.png" Stretch="None" ManipulationMode="All" ScrollViewer.HorizontalScrollBarVisibility="Visible" Width="Auto" Height="Auto"/>
</ScrollViewer>
</Grid>
【问题讨论】:
标签: uwp scrollviewer windows-10-universal