放大 WPF 的方法

发布于 2024-09-30 03:33:44 字数 132 浏览 0 评论 0原文

我需要实现与 Office 2010 中相同的缩放。

内容可以是任何 UI 元素,包括第三方网格(可能是 telerik)

我知道 4 种实现缩放的方法。

在这种情况下实现缩放的最佳方法(性能)是什么?

I Need to implement zoom same as in office 2010.

The content can be any UI element including a third party grid(probably telerik)

I know 4 ways to implement zoom.

What the best way(performance) to implement zoom in this case?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

风吹雨成花 2024-10-07 03:33:45

布局变换是缩放和保持布局最初设计的最灵活、最有效的方法。

Layout transform is the most flexible and efficient way to zoom and keep the layout as designed in first place.

冷…雨湿花 2024-10-07 03:33:45

通常最简单、最快的缩放方法是将要缩放的元素上的 RenderTransform 设置为 ScaleTransform,并设置 ScaleX 和 < code>ScaleY 变换的属性。

Usually the simplest, fastest way to zoom is to set the RenderTransform on the element to be zoomed as a ScaleTransform, and set the ScaleX and ScaleY properties of the transform.

榆西 2024-10-07 03:33:45

您可以使用如下所示的 Viewbox 组件

<Viewbox Width="..." Height="...">
    <Grid>     
       .
       .
       .
    </Grid>
</Viewbox>

You Can Use Viewbox Component Such as Below

<Viewbox Width="..." Height="...">
    <Grid>     
       .
       .
       .
    </Grid>
</Viewbox>
他是夢罘是命 2024-10-07 03:33:45

您可以使用画布在其中绘制您的控件,它支持缩放调整大小和旋转

You can use canvas to draw yuor controls in it it supports zoom resize and rotation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文