gpt4 book ai didi

c# - Xceed WPF 工具包中的 Zoombox 无法正常工作

转载 作者:太空狗 更新时间:2023-10-29 23:12:39 24 4
gpt4 key购买 nike

我正在试验 Xceed 的 Zoombox 控件,但我无法让它响应鼠标滚轮或平移事件。当我使用这些输入时没有任何反应。我的代码或配置中是否遗漏了什么?

https://github.com/xceedsoftware/wpftoolkit

<Window x:Class="UI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

mc:Ignorable="d"
Title="MainWindow" Height="800" Width="700">
<Grid>
<xctk:Zoombox MinScale="0.5" MaxScale="100" >
<Grid Width="600" Height="400" Background="Yellow">
<Ellipse Fill="Blue" />
</Grid>
</xctk:Zoombox>
</Grid>

</Window>

最佳答案

您必须定义 DragModifiersZoomModifiers。默认值为 CtrlShift 键。因此,请结合使用 Shift+MouseWheel 进行缩放,并使用 Ctrl+LeftButton 进行平移。

enter image description here

关于c# - Xceed WPF 工具包中的 Zoombox 无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45774632/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com