0
我真的很希望我在這裏沒有做一些愚蠢的事情,但是我試圖製作一個快速的UWP Windows 10測試應用程序,包括一個ScrollViewer來做圖像卷軸。 ScrollViewer工作正常,直到我嘗試使用PanningMode,當它只是說它不存在。我看到另外一篇PanningMode =「Both」的帖子沒有工作,但這絲毫沒有幫助,也沒有解決我遇到的問題。難道我是愚蠢的,就像PanningMode由於某種原因不存在,或者是否有錯誤?這是我的MainPage.xaml(雖然目前沒有進行優化或者沒有制定任何真正的標準),但我希望這已經足夠了。(UWP)ScrollViewer PanningMode - 它存在嗎?
<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>
這很奇怪,我似乎無法讓它通過觸摸我的手機進行滾動。沒關係。這可能與我如何使用卷軸工作有關。謝謝! – WhoKnows