c# - How to launch WindowsInternal.ComposableShell.Experiences.TextInput.InputApp
问题描述
I want to launch WindowsInternal.ComposableShell.Experiences.TextInput.InputApp
located in C:\Windows\SystemApps\InputApp_cw5n1h2txyewy
. To be clear, I don't want to display the touch-keyboard, I just need this particular process to be running. Is there a way to achieve that? Using .NET extensions is acceptable, but not preferred.
I want to do this to add a StateChangedWatcher at startup, but the process does not yet exist at startup and needs to be started manually for this to work right now. Also, addding this to startup manually does not launch it, neither does simply trying to execute this. Are there any parameters it needs to be launched with?
解决方案
需要明确的是,我不想显示触摸键盘,我只需要运行这个特定的进程。有没有办法做到这一点?
您将AppxManifest.xml
在C:\Windows\SystemApps\InputApp_cw5n1h2txyewy
文件夹中找到。而且里面有windows.protocol
名字。换句话说,你可以启动它Windows.System.Launcher
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="ms-inputapp" DesiredView="useMinimum">
<uap:DisplayName>Input App</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
用法
private async void Button_Click(object sender, RoutedEventArgs e)
{
var options = new Windows.System.LauncherOptions();
options.DesiredRemainingView = Windows.UI.ViewManagement.ViewSizePreference.UseMinimum;
var success = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-inputapp:"), options);
}
推荐阅读
- uwp - 如何在 Uno 平台中将 RadialGradientBrush 与 Storyboard 一起使用
- rest - Moodle Rest API 上的 invalid_parameter_exception
- eslint - eslint 错误:解析错误:保留关键字“export”
- azure - 在 Azure 中配置站点-站点 VPN 时,为什么没有本地网络网关不能配置 vpn 网关?
- sql - 查询返回不同的结果(是索引问题吗?)
- python - 如果列表包含数字序列,则返回 true
- swift - PBKDF2 密钥派生耗时太长
- html - 如何添加带有 hr 标签的边框底部
- go - 转义分析,将 var(s) 声明为指针
- ssl - SSL Fuzz 和 SSL 服务器 Fuzz 有什么不同?