是什么导致鼠标指针与组合框或列表视图上的选择不对齐
What causes the Mouse Pointer to not be lined up with the selection on a combobox or listview
最好的描述方式是用图片来描述,所以就在这里。您可以看到鼠标指针与它在组合框中选择的项目不对齐。我在列表视图上也看到过这种情况。是什么原因造成的,我该如何解决。它发生在 UWP Apps 中
对于正在寻找解决方案的其他人,我发现最简单的解决方案是将视图框的 RotateTransform 角度设置为 .0001。虽然我不完全确定它为什么有效,但它确实有效。
这是我为修复它而创建的样式。
<!--#region ViewBox Style to repair pointer misalignment-->
<Style x:Key="ViewBoxPointerMisalignmentFix" TargetType="Viewbox">
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle=".0001" />
</Setter.Value>
</Setter>
</Style>
最好的描述方式是用图片来描述,所以就在这里。您可以看到鼠标指针与它在组合框中选择的项目不对齐。我在列表视图上也看到过这种情况。是什么原因造成的,我该如何解决。它发生在 UWP Apps 中
对于正在寻找解决方案的其他人,我发现最简单的解决方案是将视图框的 RotateTransform 角度设置为 .0001。虽然我不完全确定它为什么有效,但它确实有效。
这是我为修复它而创建的样式。
<!--#region ViewBox Style to repair pointer misalignment-->
<Style x:Key="ViewBoxPointerMisalignmentFix" TargetType="Viewbox">
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle=".0001" />
</Setter.Value>
</Setter>
</Style>