简体   繁体   English

捏放大和平移

[英]Pinch to zoom and pan to move

I have figured out, that I can use ScrollViewer in iOS and in Android I can use this ScaleImageView from XamarinAndroidToolkit . 我已经知道,我可以在iOS中使用ScrollViewer ,而在Android可以使用XamarinAndroidToolkit中的ScaleImageView

But what can I use for UWP? 但是我可以为UWP使用什么?

You should be able to use ScrollViewer for this purpose as well. 您也应该能够为此使用ScrollViewer You will however need to enable zooming and both scroll bars for the control. 但是,您将需要启用缩放功能以及控件的两个滚动条。 Vertical scroll bar should be set to Auto by default, but horizontal is by default disabled. 默认情况下,垂直滚动条应设置为“ Auto ,但默认情况下应禁用水平滚动条。 The same goes for the zoom mode. 变焦模式也是如此。 If you want to hide the scroll bars, you can do so after explicitly enabling the scrolling. 如果要隐藏滚动条,可以在显式启用滚动之后进行。

<ScrollViewer ZoomMode="Enabled" 
              HorizontalScrollMode="Auto"                
              VerticalScrollMode="Auto"  
              VerticalScrollBarVisibility="Hidden" 
              HorizontalScrollBarVisibility="Hidden"
              >
   ...
</ScrollViewer>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM