以编程方式在 Win 10 中切换焦点辅助模式 [英] Toggling Focus Assist mode in Win 10 Programmatically

查看:66
本文介绍了以编程方式在 Win 10 中切换焦点辅助模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几乎所有我看过的地方都有一些悬而未决的问题,所以我想我应该把我的问题加进去.

There are a few unanswered questions to this pretty much everywhere I've looked so I suppose I should add mine to the tally.

我希望以编程方式在 Win 10 中切换 Focus Assist 模式,但迄今为止未能在官方和非官方渠道中找到大量相关文档.

I am looking to toggle Focus Assist mode in Win 10 programmatically and have thus far been unsuccessful with finding much documentation on this in both official and unofficial channels.

如果我无法以编程方式切换焦点辅助,我将需要基本上模拟相同的行为含义,即我需要拦截和压制传入的通知,直到它被关闭,然后显示在此期间被静音的通知.

If I am not able to toggle focus assist programmatically, I will need to essentially emulate the same behavior meaning, that I will need to intercept and squelch incoming notifications until it is turned off and then display notifications that were silenced during this period.

现在似乎唯一可用的方法是使用反向 WNF 信息编写一些 C++,然后祈祷它不会在更新中中断.在我进入那个兔子洞之前,我想我会看看是否有人这样做过,或者可以将我指向一个我没有考虑过的资源.

It seems the only path available right now is to write some c++ using reversed WNF information and then pray it won't break in an update. Before I go down that rabbit hole I figured I'd see if anyone has done this or maybe can point me to a resource I haven't considered.

通知监听器很棒,让我可以访问上述通知以满足我的次要要求,但它不允许我在它们进来时将它们静音,因为它与 vs 并行运行会中断通知流.

The notification listener is great and gives me access to said notifications to fulfills my secondary requirement but it does not allow me to silence them as they come in since it runs in parallel with vs interrupts the flow of the notification.

对于将来问这个问题的人,我发现这些很有帮助:

For folks that ask this question in the future, I've found these helpful:

推荐答案

我希望以编程方式在 Win 10 中切换焦点辅助模式,但迄今为止未成功

I am looking to toggle Focus Assist mode in Win 10 programmatically and have thus far been unsuccessful

目前,UWP 不提供这样的 api 以编程方式切换 Focus Assist 模式.如果您确实需要此功能,请随时在 用户语音.

Currently, UWP does not provide such api to switch Focus Assist mode programmatically . If you do want this feature, please feel free to ask for this feature on UserVoice.

这篇关于以编程方式在 Win 10 中切换焦点辅助模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆