gpt4 book ai didi

c# - 在 Windows 8 Metro 应用程序中禁用鼠标悬停焦点

转载 作者:太空宇宙 更新时间:2023-11-03 14:00:13 25 4
gpt4 key购买 nike

我正在开发此应用程序中的 window8 metro 应用程序,我正在插入两个图像按钮,在模拟器中,这次我输入了鼠标模式指针以获得焦点。

我正在实现这段代码......

 private void button_PointerEntered(object sender, Windows.UI.Xaml.Input.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("Pointer Entered");
Button thisButton = (Button)sender;
thisButton.Focus(FocusState.Unfocused);
}

如何禁用鼠标指针输入的焦点?

最佳答案

我还没有使用 Windows 8 Metro,但您可以尝试添加以下内容:

<Setter Property="FocusVisualStyle" Value="{x:Null}" />

这应该停止鼠标悬停等的任何可视化,但这是 WPF 的答案,它应该与 Metro 一起工作,但没有 promise !

关于c# - 在 Windows 8 Metro 应用程序中禁用鼠标悬停焦点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10896955/

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