我真的希望我没有在这里做什么蠢事,但我正在努力做出(快?)UWP Windows 10测试应用程序,其中包括一个ScrollViewer来进行图像滚动。ScrollViewer工作正常,直到我尝试使用PanningMode,它只是说它不存在。我看到另一个帖子,PanningMode=“Both”不起作用,但这一点也没有帮助,没有解决我遇到的问题。是因为我很愚蠢,比如因为某种原因不存在PanningMode,还是出了什么问题?这是我的主页。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>