本文介绍了[UWP]从WPF或Console App向UWP发送信息,反之亦然。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 

我有2个应用程序,一个是uwp,另一个可以是WPF或Console应用程序。

I have 2 apps one is uwp and another can be either WPF or Console app.

有2个场景 -

1。我的UWP处于运行模式,我需要将一些信息(可以说参数)从我的UWP应用程序传递到另一个应用程序(WPF或当前未运行的控制台)

1. My UWP is in running mode and I need to pass some info (can say parameter) from my UWP app to another app (WPF or Console which is not running currently)

2。反之亦然。 

2. Vice - versa. 

sandeep chauhan

sandeep chauhan

推荐答案

要在UWP和WPF应用之间进行通信,您可以尝试使用App Service。 应用服务作为主机中的后台任务运行UWP应用程序,可以为其他应用程序提供服务。有关创建应用服务的更多信息,您可以参考以下链接:创建
并使用应用服务
。要在非wup应用程序中使用应用程序服务,您可以参考此官方示例: 。

To communicate between UWP and WPF apps, you could try to use App Service. An app service runs as a background task in the host UWP app and can provide its service to other app. For more information about create app service,you could refer this link:Create and consume an app service. For using app service in no-wup apps, you could refer this official sample:AppServiceBridgeSample.

致以最好的问候,

Roy


这篇关于[UWP]从WPF或Console App向UWP发送信息,反之亦然。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 21:21