简体   繁体   English

WPF虚拟键盘在安装过程中不起作用

[英]wpf virtual keyboard not work during setup

I am new on WPF application. 我是WPF应用程序的新手。 I have done small job on WPF. 我在WPF上做得很少。 at here, I have one textbox. 在这里,我有一个文本框。 when user click or tap virtual keyboard come up. 当用户单击或点击虚拟键盘时出现。 everything is working fine on source code. 一切在源代码上都可以正常工作。 but when I create a setup & try to install ".msi" file. 但是当我创建安装程序并尝试安装“ .msi”文件时。 during setup my application have page where we have to enter password on textbox. 在设置过程中,我的应用程序有页面,我们必须在文本框中输入密码。 when I click on textbox virtual keyboard is not come up. 当我单击文本框时,虚拟键盘无法显示。 but if I install application and come that page and click textbox virtual keyboard come up. 但是,如果我安装了应用程序并进入该页面并单击“文本框”,则虚拟键盘出现。

I am not able to understand, is there configuration on creating setup or some extra code? 我无法理解,是否有关于创建安装程序的配置或一些额外的代码?

You haven't said much about what you're actually doing, so there is some guesswork here based on your "...during setup my application...". 关于实际操作,您并没有说太多,因此根据您的“ ...在安装我的应用程序...”,这里有些猜测。

It sounds like you are running your application (maybe Installer class-based) as a custom action during your MSI setup. 听起来好像您在MSI安装过程中以自定义操作的形式运行应用程序(可能基于安装程序类)。 If that's what you're doing it's very unreliable. 如果那是您正在做的事情,那将是非常不可靠的。 Installer classes usually work fine, but not if they show UI. 安装程序类通常可以正常运行,但如果显示UI,则无法正常运行。 The install execute sequence is not intended for showing UI - all that data should be entered during the normal UI sequence at the start of the install. 安装执行序列并非旨在显示UI-在安装开始时,所有数据都应在常规UI序列中输入。 UI with message handlers works only in an STA context, and the execute sequence of an MSI install isn't STA, so messages get lost. 具有消息处理程序的UI仅在STA上下文中有效,而MSI安装的执行顺序不是STA,因此消息会丢失。

In most cases people postpone this kind of thing until the app actually runs, where it's in an interactive user context. 在大多数情况下,人们会推迟这种事情,直到应用程序在交互式用户上下文中真正运行为止。 A custom action in a Visual Studio setup project being installed for Everyone will run as the local system account, and that causes some strange errors (such as trying to connect to a database that doesn't have SYSTEM as an allowed user, or accessuing the network). 为所有人安装的Visual Studio安装项目中的自定义操作将作为本地系统帐户运行,这会导致一些奇怪的错误(例如,尝试连接到没有SYSTEM作为允许用户的数据库,或者访问网络)。

So this is mostly guesswork because you haven't given much detail, but your issue fits the usual behavior of showing forms from a Visual Studio setup using installer classes. 因此,这主要是猜测,因为您没有提供太多详细信息,但是您的问题符合使用安装程序类从Visual Studio安装程序显示表单的通常行为。

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

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