简体   繁体   English

激活焦点辅助 Windows 10 以编程方式设置 C#

[英]Activating Focus Assist Windows 10 Setting Programmatically C#

I'm building a C# WPF application and want the ability to programmatically enable and disable the Windows System Feature Focus Assist .我正在构建一个 C# WPF 应用程序,并希望能够以编程方式启用和禁用 Windows System Feature Focus Assist

I've tried researching how to control this feature programmatically but cannot see anything on it (possibly because it's a new system feature).我曾尝试研究如何以编程方式控制此功能,但看不到任何内容(可能是因为它是一项新的系统功能)。 I've seen notes on using the Windows.System library however focus assist doesn't seem to apart of it我看过关于使用Windows.System库的注释,但是焦点辅助似乎并没有分开

Can anyone point me in the right direction?谁能指出我正确的方向?

These two commands might be useful to you:这两个命令可能对您有用:

using Windows.System;
await SystemSetting.RequestEnableAsync(SystemSettingKind.FocusAssist);
// ...
await SystemSetting.RequestDisableAsync(SystemSettingKind.FocusAssist);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM