简体   繁体   English

检测放大/缩小滚动查看器 uwp

[英]Detect zoom in/out scrollviewer uwp

Ive been looking for a while to know how to detect when a zoom in/out takes place in a scrollviewer to update a text I have on the view using the zoom factor property.我一直在寻找一段时间来了解如何检测滚动查看器中何时发生放大/缩小以使用缩放因子属性更新视图上的文本。

I cant find an event on the xaml I can bind/attach and communicate my view model of the change.我无法在 xaml 上找到我可以绑定/附加并传达我的更改视图模型的事件。 This has to work on the desktop version and for the surface pro version in a uwp project.这必须适用于桌面版本和 uwp 项目中的 Surface Pro 版本。 Thanks!谢谢!

Try this试试这个

sv.RegisterPropertyChangedCallback(ScrollViewer.ZoomFactorProperty, (s, e) =>
{
    // your stuff.
});

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

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