Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emoacht/uwpcommunicationtest
Test communications between UWP and WPF by AppService.
https://github.com/emoacht/uwpcommunicationtest
appservice uwp wpf
Last synced: about 5 hours ago
JSON representation
Test communications between UWP and WPF by AppService.
- Host: GitHub
- URL: https://github.com/emoacht/uwpcommunicationtest
- Owner: emoacht
- Created: 2023-04-01T09:56:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-13T10:26:26.000Z (over 1 year ago)
- Last Synced: 2023-08-26T21:59:00.920Z (about 1 year ago)
- Topics: appservice, uwp, wpf
- Language: C#
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UWP Communication Test
Test communications between UWP and WPF by AppService.
- [Create and consume an app service](https://learn.microsoft.com/en-us/windows/uwp/launch-resume/how-to-create-and-consume-an-app-service)
- [Launch an app for results](https://learn.microsoft.com/en-us/windows/uwp/launch-resume/how-to-launch-an-app-for-results)
- [Protocol Activation in UWP](https://stackoverflow.com/questions/38627876/protocol-activation-in-uwp)[Launcher.LaunchUriAsync](https://learn.microsoft.com/ja-jp/uwp/api/windows.system.launcher.launchuriasync) method (except overload which takes ValueSet) works on WPF but [Launcher.LaunchUriForResultsAsync](https://learn.microsoft.com/ja-jp/uwp/api/windows.system.launcher.launchuriforresultsasync) method seems to always throw InvalidOperationException if called on WPF.
## How to communicate
### Case 1
Both `ComApp.Uwp` and `ComApp.Wpf` are packaged in `ComApp` packaging project.
1. Build and start `ComApp`. It will install both apps.
2. Start `ComApp.Uwp`. Hit __Launch WPF__ to start `ComApp.Wpf`.
3. Send the messages to each other.### Case 2
`ComApp.Uwp2` and `ComApp.Wpf2` are independent apps.
1. Build and start `ComApp.Uwp2`. It will install this app.
2. Build and start `ComApp.Wpf2`. It will find the installed `ComApp.Uwp2` and fill FamilyName. Hit __Launch UWP__ to start `ComApp.Uwp2`.
3. Send the messages to each other.