2014-11-01 72 views
0

我在我的xaml Page.I上有一張圖片,我希望那個用戶可以用MouseWheel捏和縮放它。我已經用Scrollviewer嘗試了很多次,但它不工作。這就是我正在嘗試的。 <ScrollViewer x:Name="scrollViewer" Width="480" Height="270" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" ZoomMode="Enabled" MinZoomFactor="0.7"> <StackPanel Width="480" Height="270" Orientation="Horizontal"> <Image AutomationProperties.Name="Image of a cliff" Source="images/cliff.jpg" Stretch="Uniform" HorizontalAlignment="Left" VerticalAlignment="Top"/> </StackPanel> </ScrollViewer>如何在Windows8.1商店應用中使用xaml捏和縮放圖像?

回答

0

默認的ScrollViewer應該使用Control + MouseWheel。 而你的代碼工作。

+0

它正在工作,當我通過模擬器運行。在我的桌面上它不工作。 – 2014-11-03 06:51:30