├── ComposeTestMessage
├── ComposeTestMessage.sln
├── ComposeTextMessage
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── ApplicationInsights.config
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── ComposeTextMessage.csproj
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── project.json
│ └── project.lock.json
└── README.md
├── LICENSE
├── README.md
├── UniversalAppLaunchingWPFApp
├── README.md
├── SolutionItems
│ └── InstallWin32ProtocolHandler.reg
├── UniversalAppLaunchingWPFApp.sln
├── WPFProtocolHandler
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ └── WPFProtocolHandler.csproj
└── Windows10Launcher
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ ├── LockScreenLogo.scale-200.png
│ ├── SplashScreen.scale-200.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── StoreLogo.png
│ └── Wide310x150Logo.scale-200.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
│ ├── Windows10Launcher.csproj
│ └── project.json
├── WPFAppLaunchingUniversalApp
├── README.md
├── UniversalTargetApp
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── ApplicationInsights.config
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── ProtocolActivationPage.xaml
│ ├── ProtocolActivationPage.xaml.cs
│ ├── UniversalTargetApp.csproj
│ └── project.json
├── WPFAppLaunchingUniversalApp.sln
└── WPFLauncherApp
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── WPFLauncherApp.csproj
└── Win32AppServiceClient
├── AppServicesProvider
├── App.xaml
├── App.xaml.cs
├── AppServicesProvider.csproj
├── ApplicationInsights.config
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── MainPage.xaml
├── MainPage.xaml.cs
├── Package.appxmanifest
├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
└── packages.config
├── README.md
├── RandomNumberService
├── Properties
│ └── AssemblyInfo.cs
├── RandomNumberGeneratorTask.cs
├── RandomNumberService.csproj
└── packages.config
├── Win32AppServiceClient.sln
└── Win32AppServiceClient
├── App.config
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
└── Win32AppServiceClient.csproj
/ComposeTestMessage/ComposeTestMessage.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComposeTextMessage", "ComposeTextMessage\ComposeTextMessage.csproj", "{4ADC2FB7-D12B-4C1F-A838-49950E2964F7}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|x64 = Debug|x64
12 | Debug|x86 = Debug|x86
13 | Release|ARM = Release|ARM
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|ARM.ActiveCfg = Debug|ARM
19 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|ARM.Build.0 = Debug|ARM
20 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|ARM.Deploy.0 = Debug|ARM
21 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x64.ActiveCfg = Debug|x64
22 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x64.Build.0 = Debug|x64
23 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x64.Deploy.0 = Debug|x64
24 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x86.ActiveCfg = Debug|x86
25 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x86.Build.0 = Debug|x86
26 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Debug|x86.Deploy.0 = Debug|x86
27 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|ARM.ActiveCfg = Release|ARM
28 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|ARM.Build.0 = Release|ARM
29 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|ARM.Deploy.0 = Release|ARM
30 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x64.ActiveCfg = Release|x64
31 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x64.Build.0 = Release|x64
32 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x64.Deploy.0 = Release|x64
33 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x86.ActiveCfg = Release|x86
34 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x86.Build.0 = Release|x86
35 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}.Release|x86.Deploy.0 = Release|x86
36 | EndGlobalSection
37 | GlobalSection(SolutionProperties) = preSolution
38 | HideSolutionNode = FALSE
39 | EndGlobalSection
40 | EndGlobal
41 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace ComposeTextMessage
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 | #if DEBUG
44 | if (System.Diagnostics.Debugger.IsAttached)
45 | {
46 | this.DebugSettings.EnableFrameRateCounter = true;
47 | }
48 | #endif
49 |
50 | Frame rootFrame = Window.Current.Content as Frame;
51 |
52 | // Do not repeat app initialization when the Window already has content,
53 | // just ensure that the window is active
54 | if (rootFrame == null)
55 | {
56 | // Create a Frame to act as the navigation context and navigate to the first page
57 | rootFrame = new Frame();
58 |
59 | rootFrame.NavigationFailed += OnNavigationFailed;
60 |
61 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
62 | {
63 | //TODO: Load state from previously suspended application
64 | }
65 |
66 | // Place the frame in the current Window
67 | Window.Current.Content = rootFrame;
68 | }
69 |
70 | if (rootFrame.Content == null)
71 | {
72 | // When the navigation stack isn't restored navigate to the first page,
73 | // configuring the new page by passing required information as a navigation
74 | // parameter
75 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
76 | }
77 | // Ensure the current window is active
78 | Window.Current.Activate();
79 | }
80 |
81 | ///
82 | /// Invoked when Navigation to a certain page fails
83 | ///
84 | /// The Frame which failed navigation
85 | /// Details about the navigation failure
86 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
87 | {
88 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
89 | }
90 |
91 | ///
92 | /// Invoked when application execution is being suspended. Application state is saved
93 | /// without knowing whether the application will be terminated or resumed with the contents
94 | /// of memory still intact.
95 | ///
96 | /// The source of the suspend request.
97 | /// Details about the suspend request.
98 | private void OnSuspending(object sender, SuspendingEventArgs e)
99 | {
100 | var deferral = e.SuspendingOperation.GetDeferral();
101 | //TODO: Save application state and stop any background activity
102 | deferral.Complete();
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/ComposeTestMessage/ComposeTextMessage/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/ComposeTextMessage.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {4ADC2FB7-D12B-4C1F-A838-49950E2964F7}
8 | AppContainerExe
9 | Properties
10 | ComposeTextMessage
11 | ComposeTextMessage
12 | en-US
13 | UAP
14 | 10.0.10166.0
15 | 10.0.10166.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | ComposeTextMessage_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 | PreserveNewest
95 |
96 |
97 |
98 |
99 |
100 | App.xaml
101 |
102 |
103 | MainPage.xaml
104 |
105 |
106 |
107 |
108 |
109 | Designer
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | MSBuild:Compile
125 | Designer
126 |
127 |
128 | MSBuild:Compile
129 | Designer
130 |
131 |
132 |
133 |
134 |
135 |
136 | 14.0
137 |
138 |
139 |
146 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel.Chat;
7 | using Windows.Foundation;
8 | using Windows.Foundation.Collections;
9 | using Windows.UI.Xaml;
10 | using Windows.UI.Xaml.Controls;
11 | using Windows.UI.Xaml.Controls.Primitives;
12 | using Windows.UI.Xaml.Data;
13 | using Windows.UI.Xaml.Input;
14 | using Windows.UI.Xaml.Media;
15 | using Windows.UI.Xaml.Navigation;
16 |
17 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
18 |
19 | namespace ComposeTextMessage
20 | {
21 | ///
22 | /// An empty page that can be used on its own or navigated to within a Frame.
23 | ///
24 | public sealed partial class MainPage : Page
25 | {
26 | public MainPage()
27 | {
28 | this.InitializeComponent();
29 | }
30 |
31 | private async void ComposeMessage_Click(object sender, RoutedEventArgs e)
32 | {
33 | //Check if the current device has any transports that can deliver
34 | //a text message. Note that calling this API requires the chat
35 | //capability (see Package.appxmanifest)
36 | var transports = await ChatMessageManager.GetTransportsAsync();
37 |
38 | //If there are transports available, call ShowComposeSmsMessageAsync
39 | if (transports.Any())
40 | {
41 | var textMessage = new ChatMessage();
42 | textMessage.Body = Message.Text;
43 | await ChatMessageManager.ShowComposeSmsMessageAsync(textMessage);
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | ComposeTextMessage
18 | arsingh
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ComposeTextMessage")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ComposeTextMessage")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ComposeTestMessage/ComposeTextMessage/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/ComposeTestMessage/README.md:
--------------------------------------------------------------------------------
1 | # Compose Test Message
2 |
3 | This sample demonstrates how a Windows 10 app can use the
4 | ChatMesageManager.ShowComposeSmsMessageAsync API safely. By checking for the
5 | availability of transports we ensure [ShowComposeSmsMessageAsync](https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.applicationmodel.chat.chatmessagemanager.showcomposesmsmessageasync.aspx) is only called
6 | if text message support is available on the current device. This means that
7 | the code also works great on desktop where SMS messaging is not available.
8 | More details can be found here: [ChatMessageManager.ShowComposeSmsMessageAsync
9 | Crashes on Windows 10 Desktop](https://aruntalkstech.wordpress.com/2015/07/24/chatmessagemanager-showcomposesmsmessageasync-crashes-on-windows-10-desktop/)
10 |
11 |
12 | ## Windows 10 Samples
13 |
14 | Unless otherwise noted, most of these code samples target Windows 10 and are
15 | universal. That is, they can be run on any device that runs Windows 10. To
16 | run these samples, you will need Visual Studio 2015 and the Windows 10 Software
17 | Development Kit (SDK). These can be found at .
18 |
19 | If you'd like a free copy of Windows 10 please become a
20 | [Windows Insider](http://insider.windows.com)
21 |
22 | Happy hacking!
23 |
24 | [@aruntalkstech](http://www.twitter.com/aruntalkstech)
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Arun Singh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sample Code
2 |
3 | This repo contains sample code referred to in for .
4 |
5 |
6 | ## Windows 10 Samples
7 |
8 | Unless otherwise noted, most of these code samples target Windows 10 and are
9 | universal. That is, they can be run on any device that runs Windows 10. To
10 | run these samples, you will need Visual Studio 2015 and the Windows 10 Software
11 | Development Kit (SDK). These can be found at .
12 |
13 | If you'd like a free copy of Windows 10 please become a
14 | [Windows Insider](http://insider.windows.com)
15 |
16 | Happy hacking!
17 |
18 | [@aruntalkstech](http://www.twitter.com/aruntalkstech)
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/README.md:
--------------------------------------------------------------------------------
1 | # Universal App Launching WPF App
2 |
3 | This sample demostrates a Universal Windows App (UWA) launching
4 | or deep linking into a Windows Presentation Foundation (WPF) app. To run
5 | the sample you will need Visual Studio 2015 and the Windows 10 SDK. Both of these
6 | can be found at .
7 |
8 | With Visual Studio, open the solution UniversalAppLaunchingWPFApp\UniversalAppLaunchingWPFApp.sln. A detailed
9 | description of this sample is available
10 | [here](https://aruntalkstech.wordpress.com/2015/08/29/launch-a-wpf-win32-app-from-a-universal-windows-app/).
11 |
12 | Feel free to submit pull requests on this README.md or the code if you think it could
13 | use improvement. Happy hacking!
14 |
15 | [@aruntalkstech](https://twitter.com/aruntalkstech)
16 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/SolutionItems/InstallWin32ProtocolHandler.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/SolutionItems/InstallWin32ProtocolHandler.reg
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/UniversalAppLaunchingWPFApp.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFProtocolHandler", "WPFProtocolHandler\WPFProtocolHandler.csproj", "{A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Windows10Launcher", "Windows10Launcher\Windows10Launcher.csproj", "{C7A11598-42DD-457C-9FE6-4C6803ADE0E6}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{0BA9D02B-9EA4-418E-8EE6-7ABC5A79196E}"
11 | ProjectSection(SolutionItems) = preProject
12 | SolutionItems\InstallWin32ProtocolHandler.reg = SolutionItems\InstallWin32ProtocolHandler.reg
13 | EndProjectSection
14 | EndProject
15 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DE58FE85-BBBF-48E7-A13B-F69B17534809}"
16 | ProjectSection(SolutionItems) = preProject
17 | README.md = README.md
18 | EndProjectSection
19 | EndProject
20 | Global
21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
22 | Debug|Any CPU = Debug|Any CPU
23 | Debug|ARM = Debug|ARM
24 | Debug|x64 = Debug|x64
25 | Debug|x86 = Debug|x86
26 | Release|Any CPU = Release|Any CPU
27 | Release|ARM = Release|ARM
28 | Release|x64 = Release|x64
29 | Release|x86 = Release|x86
30 | EndGlobalSection
31 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
32 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|ARM.ActiveCfg = Debug|Any CPU
35 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|ARM.Build.0 = Debug|Any CPU
36 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|x64.ActiveCfg = Debug|Any CPU
37 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|x64.Build.0 = Debug|Any CPU
38 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|x86.ActiveCfg = Debug|Any CPU
39 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Debug|x86.Build.0 = Debug|Any CPU
40 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|Any CPU.Build.0 = Release|Any CPU
42 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|ARM.ActiveCfg = Release|Any CPU
43 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|ARM.Build.0 = Release|Any CPU
44 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|x64.ActiveCfg = Release|Any CPU
45 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|x64.Build.0 = Release|Any CPU
46 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|x86.ActiveCfg = Release|Any CPU
47 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}.Release|x86.Build.0 = Release|Any CPU
48 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|Any CPU.ActiveCfg = Debug|x86
49 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|ARM.ActiveCfg = Debug|ARM
50 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|ARM.Build.0 = Debug|ARM
51 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|ARM.Deploy.0 = Debug|ARM
52 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x64.ActiveCfg = Debug|x64
53 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x64.Build.0 = Debug|x64
54 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x64.Deploy.0 = Debug|x64
55 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x86.ActiveCfg = Debug|x86
56 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x86.Build.0 = Debug|x86
57 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Debug|x86.Deploy.0 = Debug|x86
58 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|Any CPU.ActiveCfg = Release|x86
59 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|ARM.ActiveCfg = Release|ARM
60 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|ARM.Build.0 = Release|ARM
61 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|ARM.Deploy.0 = Release|ARM
62 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x64.ActiveCfg = Release|x64
63 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x64.Build.0 = Release|x64
64 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x64.Deploy.0 = Release|x64
65 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x86.ActiveCfg = Release|x86
66 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x86.Build.0 = Release|x86
67 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}.Release|x86.Deploy.0 = Release|x86
68 | EndGlobalSection
69 | GlobalSection(SolutionProperties) = preSolution
70 | HideSolutionNode = FALSE
71 | EndGlobalSection
72 | EndGlobal
73 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WPFProtocolHandler
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Win32;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using System.Windows.Controls;
11 | using System.Windows.Data;
12 | using System.Windows.Documents;
13 | using System.Windows.Input;
14 | using System.Windows.Media;
15 | using System.Windows.Media.Imaging;
16 | using System.Windows.Navigation;
17 | using System.Windows.Shapes;
18 | using Windows.ApplicationModel.DataTransfer;
19 | using Windows.Foundation;
20 |
21 | namespace WPFProtocolHandler
22 | {
23 | ///
24 | /// Interaction logic for MainWindow.xaml
25 | ///
26 | public partial class MainWindow : Window
27 | {
28 | private Dictionary inputs = new Dictionary();
29 |
30 | public MainWindow()
31 | {
32 | InitializeComponent();
33 |
34 | var args = Environment.GetCommandLineArgs();
35 |
36 | if (args.Length > 1)
37 | {
38 | Uri argUri;
39 | if (Uri.TryCreate(args[1], UriKind.Absolute, out argUri))
40 | {
41 | var decoder = new WwwFormUrlDecoder(argUri.Query);
42 | if (decoder.Any())
43 | {
44 | InputUrI.Text = string.Empty;
45 |
46 | foreach (var entry in decoder)
47 | {
48 | InputUrI.Text += entry.Name + "=" + entry.Value + ",";
49 | inputs[entry.Name] = entry.Value;
50 | }
51 |
52 | InputUrI.Text = InputUrI.Text.Remove(InputUrI.Text.Length - 1);
53 | }
54 | }
55 | }
56 | }
57 |
58 | private void InstallProtocol_Click(object sender, RoutedEventArgs e)
59 | {
60 | using (var hkcr = Registry.ClassesRoot)
61 | {
62 | if (hkcr.GetSubKeyNames().Contains(SchemeName.Text))
63 | {
64 | MessageBox.Show(string.Format("Looks like {0} is already installed.", SchemeName.Text));
65 | return;
66 | }
67 |
68 | using (var schemeKey = hkcr.CreateSubKey(SchemeName.Text))
69 | {
70 | //[HKEY_CLASSES_ROOT\com.aruntalkstech.wpftarget]
71 | //@="Url:WPF Target Protocol"
72 | //"URL Protocol"=""
73 | //"UseOriginalUrlEncoding"=dword:00000001
74 | schemeKey.SetValue(string.Empty, "Url: WPF Target Protocol");
75 | schemeKey.SetValue("URL Protocol", string.Empty);
76 | schemeKey.SetValue("UseOriginalUrlEncoding", 1, RegistryValueKind.DWord);
77 |
78 | //[HKEY_CLASSES_ROOT\com.aruntalkstech.wpf\shell]
79 | using (var shellKey = schemeKey.CreateSubKey("shell"))
80 | {
81 | //[HKEY_CLASSES_ROOT\com.aruntalkstech.wpf\shell\open]
82 | using (var openKey = shellKey.CreateSubKey("open"))
83 | {
84 | //[HKEY_CLASSES_ROOT\com.aruntalkstech.wpf\shell\open\command]
85 | using (var commandKey = openKey.CreateSubKey("command"))
86 | {
87 | //@="C:\\github\\SampleCode\\UniversalAppLaunchingWPFApp\\WPFProtocolHandler\\bin\\Debug\\WPFProtocolHandler.exe \"%1\""
88 | commandKey.SetValue(string.Empty, Assembly.GetExecutingAssembly().Location + " %1");
89 | commandKey.Close();
90 | }
91 | openKey.Close();
92 | }
93 | shellKey.Close();
94 | }
95 | schemeKey.Close();
96 | }
97 | hkcr.Close();
98 | }
99 |
100 | MessageBox.Show(string.Format("Custom scheme {0}: installed.", SchemeName.Text));
101 | }
102 |
103 | private void UninstallProtocol_Click(object sender, RoutedEventArgs e)
104 | {
105 | using (var hkcr = Registry.ClassesRoot)
106 | {
107 | if (!hkcr.GetSubKeyNames().Contains(SchemeName.Text))
108 | {
109 | MessageBox.Show(string.Format("Looks like {0} is not installed.", SchemeName.Text));
110 | return;
111 | }
112 |
113 | hkcr.DeleteSubKeyTree(SchemeName.Text);
114 | hkcr.Close();
115 | }
116 |
117 | MessageBox.Show(string.Format("Custom scheme {0}: uninstalled.", SchemeName.Text));
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WPFProtocolHandler")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WPFProtocolHandler")]
15 | [assembly: AssemblyCopyright("Copyright © 2015")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFProtocolHandler.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFProtocolHandler.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFProtocolHandler.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/WPFProtocolHandler/WPFProtocolHandler.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A7D68839-4A88-4DD4-AFEB-E9C6A79E62C5}
8 | WinExe
9 | Properties
10 | WPFProtocolHandler
11 | WPFProtocolHandler
12 | v4.5.2
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | False
44 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.dll
45 |
46 |
47 | False
48 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
49 |
50 |
51 | C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 4.0
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | MSBuild:Compile
71 | Designer
72 |
73 |
74 | MSBuild:Compile
75 | Designer
76 |
77 |
78 | App.xaml
79 | Code
80 |
81 |
82 | MainWindow.xaml
83 | Code
84 |
85 |
86 |
87 |
88 | Code
89 |
90 |
91 | True
92 | True
93 | Resources.resx
94 |
95 |
96 | True
97 | Settings.settings
98 | True
99 |
100 |
101 | ResXFileCodeGenerator
102 | Resources.Designer.cs
103 |
104 |
105 | SettingsSingleFileGenerator
106 | Settings.Designer.cs
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
121 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace Windows10Launcher
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 | #if DEBUG
44 | if (System.Diagnostics.Debugger.IsAttached)
45 | {
46 | this.DebugSettings.EnableFrameRateCounter = true;
47 | }
48 | #endif
49 |
50 | Frame rootFrame = Window.Current.Content as Frame;
51 |
52 | // Do not repeat app initialization when the Window already has content,
53 | // just ensure that the window is active
54 | if (rootFrame == null)
55 | {
56 | // Create a Frame to act as the navigation context and navigate to the first page
57 | rootFrame = new Frame();
58 |
59 | rootFrame.NavigationFailed += OnNavigationFailed;
60 |
61 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
62 | {
63 | //TODO: Load state from previously suspended application
64 | }
65 |
66 | // Place the frame in the current Window
67 | Window.Current.Content = rootFrame;
68 | }
69 |
70 | if (rootFrame.Content == null)
71 | {
72 | // When the navigation stack isn't restored navigate to the first page,
73 | // configuring the new page by passing required information as a navigation
74 | // parameter
75 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
76 | }
77 | // Ensure the current window is active
78 | Window.Current.Activate();
79 | }
80 |
81 | ///
82 | /// Invoked when Navigation to a certain page fails
83 | ///
84 | /// The Frame which failed navigation
85 | /// Details about the navigation failure
86 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
87 | {
88 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
89 | }
90 |
91 | ///
92 | /// Invoked when application execution is being suspended. Application state is saved
93 | /// without knowing whether the application will be terminated or resumed with the contents
94 | /// of memory still intact.
95 | ///
96 | /// The source of the suspend request.
97 | /// Details about the suspend request.
98 | private void OnSuspending(object sender, SuspendingEventArgs e)
99 | {
100 | var deferral = e.SuspendingOperation.GetDeferral();
101 | //TODO: Save application state and stop any background activity
102 | deferral.Complete();
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/UniversalAppLaunchingWPFApp/Windows10Launcher/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel.DataTransfer;
7 | using Windows.Foundation;
8 | using Windows.Foundation.Collections;
9 | using Windows.Storage;
10 | using Windows.System;
11 | using Windows.UI.Xaml;
12 | using Windows.UI.Xaml.Controls;
13 | using Windows.UI.Xaml.Controls.Primitives;
14 | using Windows.UI.Xaml.Data;
15 | using Windows.UI.Xaml.Input;
16 | using Windows.UI.Xaml.Media;
17 | using Windows.UI.Xaml.Navigation;
18 |
19 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
20 |
21 | namespace Windows10Launcher
22 | {
23 | ///
24 | /// An empty page that can be used on its own or navigated to within a Frame.
25 | ///
26 | public sealed partial class MainPage : Page
27 | {
28 | public MainPage()
29 | {
30 | this.InitializeComponent();
31 | }
32 |
33 | private async void LaunchWpfApp_Click(object sender, RoutedEventArgs e)
34 | {
35 | var launchUri = new Uri(UriToLaunch.Text);
36 | await Launcher.LaunchUriAsync(launchUri);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | Windows10Launcher
18 | arsingh
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Windows10Launcher")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Windows10Launcher")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/Windows10Launcher.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {C7A11598-42DD-457C-9FE6-4C6803ADE0E6}
8 | AppContainerExe
9 | Properties
10 | Windows10Launcher
11 | Windows10Launcher
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | Windows10Launcher_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 | MainPage.xaml
101 |
102 |
103 |
104 |
105 |
106 | Designer
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | MSBuild:Compile
122 | Designer
123 |
124 |
125 | MSBuild:Compile
126 | Designer
127 |
128 |
129 |
130 | 14.0
131 |
132 |
133 |
140 |
--------------------------------------------------------------------------------
/UniversalAppLaunchingWPFApp/Windows10Launcher/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/README.md:
--------------------------------------------------------------------------------
1 | # WPF App Launching Universal App
2 |
3 | This sample demostrates a Windows Presentation Foundation (WPF) app launching
4 | or deep linking into a Universal Windows App (UWA). To run
5 | the sample you will need Visual Studio 2015 and the Windows 10 SDK. Both of these
6 | can be found at .
7 |
8 | With Visual Studio, open the solution WPFAppLaunchingUniversalApp.sln. A detailed
9 | description of this sample is available
10 | [here](https://aruntalkstech.wordpress.com/2015/08/12/launch-a-universal-app-from-a-wpf-app/).
11 |
12 | Feel free to submit pull requests on this README.md or the code if you think it could
13 | use improvement. Happy hacking!
14 |
15 | [@aruntalkstech](https://twitter.com/aruntalkstech)
16 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace UniversalTargetApp
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 | Frame rootFrame = Window.Current.Content as Frame;
43 |
44 | // Do not repeat app initialization when the Window already has content,
45 | // just ensure that the window is active
46 | if (rootFrame == null)
47 | {
48 | // Create a Frame to act as the navigation context and navigate to the first page
49 | rootFrame = new Frame();
50 |
51 | rootFrame.NavigationFailed += OnNavigationFailed;
52 |
53 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
54 | {
55 | //TODO: Load state from previously suspended application
56 | }
57 |
58 | // Place the frame in the current Window
59 | Window.Current.Content = rootFrame;
60 | }
61 |
62 | if (rootFrame.Content == null)
63 | {
64 | // When the navigation stack isn't restored navigate to the first page,
65 | // configuring the new page by passing required information as a navigation
66 | // parameter
67 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
68 | }
69 | // Ensure the current window is active
70 | Window.Current.Activate();
71 | }
72 |
73 | protected override void OnActivated(IActivatedEventArgs args)
74 | {
75 | Frame rootFrame = Window.Current.Content as Frame;
76 |
77 | if (rootFrame == null)
78 | {
79 | rootFrame = new Frame();
80 |
81 | rootFrame.NavigationFailed += OnNavigationFailed;
82 |
83 | // Place the frame in the current Window
84 | Window.Current.Content = rootFrame;
85 | }
86 |
87 | string uri = string.Empty;
88 | var protocolArgs = args as ProtocolActivatedEventArgs;
89 | if(protocolArgs != null)
90 | {
91 | uri = protocolArgs.Uri.ToString();
92 | }
93 |
94 | rootFrame.Navigate(typeof(ProtocolActivationPage), uri);
95 |
96 | // Ensure the current window is active
97 | Window.Current.Activate();
98 | }
99 |
100 | ///
101 | /// Invoked when Navigation to a certain page fails
102 | ///
103 | /// The Frame which failed navigation
104 | /// Details about the navigation failure
105 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
106 | {
107 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
108 | }
109 |
110 | ///
111 | /// Invoked when application execution is being suspended. Application state is saved
112 | /// without knowing whether the application will be terminated or resumed with the contents
113 | /// of memory still intact.
114 | ///
115 | /// The source of the suspend request.
116 | /// Details about the suspend request.
117 | private void OnSuspending(object sender, SuspendingEventArgs e)
118 | {
119 | var deferral = e.SuspendingOperation.GetDeferral();
120 | //TODO: Save application state and stop any background activity
121 | deferral.Complete();
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/WPFAppLaunchingUniversalApp/UniversalTargetApp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
17 |
18 | namespace UniversalTargetApp
19 | {
20 | ///
21 | /// An empty page that can be used on its own or navigated to within a Frame.
22 | ///
23 | public sealed partial class MainPage : Page
24 | {
25 | public MainPage()
26 | {
27 | this.InitializeComponent();
28 | }
29 |
30 | protected override void OnNavigatedTo(NavigationEventArgs e)
31 | {
32 | PFN.Text = Windows.ApplicationModel.Package.Current.Id.FamilyName;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | UniversalTargetApp
7 | arsingh
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UniversalTargetApp")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UniversalTargetApp")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/ProtocolActivationPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/ProtocolActivationPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel.Activation;
7 | using Windows.Foundation;
8 | using Windows.Foundation.Collections;
9 | using Windows.UI.Xaml;
10 | using Windows.UI.Xaml.Controls;
11 | using Windows.UI.Xaml.Controls.Primitives;
12 | using Windows.UI.Xaml.Data;
13 | using Windows.UI.Xaml.Input;
14 | using Windows.UI.Xaml.Media;
15 | using Windows.UI.Xaml.Navigation;
16 |
17 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
18 |
19 | namespace UniversalTargetApp
20 | {
21 | ///
22 | /// An empty page that can be used on its own or navigated to within a Frame.
23 | ///
24 | public sealed partial class ProtocolActivationPage : Page
25 | {
26 | public ProtocolActivationPage()
27 | {
28 | this.InitializeComponent();
29 | }
30 |
31 | protected override void OnNavigatedTo(NavigationEventArgs e)
32 | {
33 | var uri = e.Parameter as string;
34 | ActivationUri.Text = uri;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/UniversalTargetApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}
8 | AppContainerExe
9 | Properties
10 | UniversalTargetApp
11 | UniversalTargetApp
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | UniversalTargetApp_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 | PreserveNewest
95 |
96 |
97 |
98 |
99 |
100 | App.xaml
101 |
102 |
103 | MainPage.xaml
104 |
105 |
106 |
107 | ProtocolActivationPage.xaml
108 |
109 |
110 |
111 |
112 | Designer
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | MSBuild:Compile
128 | Designer
129 |
130 |
131 | MSBuild:Compile
132 | Designer
133 |
134 |
135 | Designer
136 | MSBuild:Compile
137 |
138 |
139 |
140 | 14.0
141 |
142 |
143 |
150 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/UniversalTargetApp/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFAppLaunchingUniversalApp.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFLauncherApp", "WPFLauncherApp\WPFLauncherApp.csproj", "{90607059-D06F-4BA1-A173-941310D63B5D}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalTargetApp", "UniversalTargetApp\UniversalTargetApp.csproj", "{FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|ARM = Debug|ARM
14 | Debug|x64 = Debug|x64
15 | Debug|x86 = Debug|x86
16 | Release|Any CPU = Release|Any CPU
17 | Release|ARM = Release|ARM
18 | Release|x64 = Release|x64
19 | Release|x86 = Release|x86
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|ARM.ActiveCfg = Debug|Any CPU
25 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|ARM.Build.0 = Debug|Any CPU
26 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|x64.ActiveCfg = Debug|Any CPU
27 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|x64.Build.0 = Debug|Any CPU
28 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|x86.ActiveCfg = Debug|Any CPU
29 | {90607059-D06F-4BA1-A173-941310D63B5D}.Debug|x86.Build.0 = Debug|Any CPU
30 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|ARM.ActiveCfg = Release|Any CPU
33 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|ARM.Build.0 = Release|Any CPU
34 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|x64.ActiveCfg = Release|Any CPU
35 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|x64.Build.0 = Release|Any CPU
36 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|x86.ActiveCfg = Release|Any CPU
37 | {90607059-D06F-4BA1-A173-941310D63B5D}.Release|x86.Build.0 = Release|Any CPU
38 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|Any CPU.ActiveCfg = Debug|x86
39 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|ARM.ActiveCfg = Debug|ARM
40 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|ARM.Build.0 = Debug|ARM
41 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|ARM.Deploy.0 = Debug|ARM
42 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x64.ActiveCfg = Debug|x64
43 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x64.Build.0 = Debug|x64
44 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x64.Deploy.0 = Debug|x64
45 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x86.ActiveCfg = Debug|x86
46 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x86.Build.0 = Debug|x86
47 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Debug|x86.Deploy.0 = Debug|x86
48 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|Any CPU.ActiveCfg = Release|x86
49 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|ARM.ActiveCfg = Release|ARM
50 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|ARM.Build.0 = Release|ARM
51 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|ARM.Deploy.0 = Release|ARM
52 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x64.ActiveCfg = Release|x64
53 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x64.Build.0 = Release|x64
54 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x64.Deploy.0 = Release|x64
55 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x86.ActiveCfg = Release|x86
56 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x86.Build.0 = Release|x86
57 | {FD740F36-F2D4-4FD2-A18E-D7D3768AD82C}.Release|x86.Deploy.0 = Release|x86
58 | EndGlobalSection
59 | GlobalSection(SolutionProperties) = preSolution
60 | HideSolutionNode = FALSE
61 | EndGlobalSection
62 | EndGlobal
63 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WPFLauncherApp
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Data;
10 | using System.Windows.Documents;
11 | using System.Windows.Input;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 | using System.Windows.Navigation;
15 | using System.Windows.Shapes;
16 | using Windows.System;
17 |
18 | namespace WPFLauncherApp
19 | {
20 | ///
21 | /// Interaction logic for MainWindow.xaml
22 | ///
23 | public partial class MainWindow : Window
24 | {
25 | readonly Uri uri = new Uri("com.aruntalkstech.universaltarget:DoSomething?With=This");
26 | const string TargetPackageFamilyName = "06c4afd0-0d59-4cef-a927-39fc6c4a9f5c_876gvmnfevegr";
27 |
28 | public MainWindow()
29 | {
30 | InitializeComponent();
31 | }
32 |
33 | protected override async void OnActivated(EventArgs e)
34 | {
35 | //Test whether the app we want to launch is installed
36 | var supportStatus = await Launcher.QueryUriSupportAsync(uri, LaunchQuerySupportType.Uri, TargetPackageFamilyName);
37 | if (supportStatus != LaunchQuerySupportStatus.Available)
38 | {
39 | Status.Text = "Can't launch com.aruntalkstech.universaltarget: because the app we need is " + supportStatus.ToString();
40 | }
41 | }
42 |
43 | private async void LaunchTargetApp_Click(object sender, RoutedEventArgs e)
44 | {
45 | var options = new LauncherOptions { TargetApplicationPackageFamilyName = TargetPackageFamilyName };
46 | bool success = await Launcher.LaunchUriAsync(uri, options);
47 | Debug.WriteLine(success);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WPFLauncherApp")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WPFLauncherApp")]
15 | [assembly: AssemblyCopyright("Copyright © 2015")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFLauncherApp.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFLauncherApp.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFLauncherApp.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WPFAppLaunchingUniversalApp/WPFLauncherApp/WPFLauncherApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {90607059-D06F-4BA1-A173-941310D63B5D}
8 | WinExe
9 | Properties
10 | WPFLauncherApp
11 | WPFLauncherApp
12 | v4.5.2
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | False
44 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.dll
45 |
46 |
47 | False
48 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
49 |
50 |
51 | C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 4.0
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | MSBuild:Compile
71 | Designer
72 |
73 |
74 | MSBuild:Compile
75 | Designer
76 |
77 |
78 | App.xaml
79 | Code
80 |
81 |
82 | MainWindow.xaml
83 | Code
84 |
85 |
86 |
87 |
88 | Code
89 |
90 |
91 | True
92 | True
93 | Resources.resx
94 |
95 |
96 | True
97 | Settings.settings
98 | True
99 |
100 |
101 | ResXFileCodeGenerator
102 | Resources.Designer.cs
103 |
104 |
105 | SettingsSingleFileGenerator
106 | Settings.Designer.cs
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
121 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409
19 |
20 | namespace AppServicesProvider
21 | {
22 | ///
23 | /// Provides application-specific behavior to supplement the default Application class.
24 | ///
25 | sealed partial class App : Application
26 | {
27 | ///
28 | /// Allows tracking page views, exceptions and other telemetry through the Microsoft Application Insights service.
29 | ///
30 | public static Microsoft.ApplicationInsights.TelemetryClient TelemetryClient;
31 |
32 | ///
33 | /// Initializes the singleton application object. This is the first line of authored code
34 | /// executed, and as such is the logical equivalent of main() or WinMain().
35 | ///
36 | public App()
37 | {
38 | TelemetryClient = new Microsoft.ApplicationInsights.TelemetryClient();
39 |
40 | this.InitializeComponent();
41 | this.Suspending += OnSuspending;
42 | }
43 |
44 | ///
45 | /// Invoked when the application is launched normally by the end user. Other entry points
46 | /// will be used such as when the application is launched to open a specific file.
47 | ///
48 | /// Details about the launch request and process.
49 | protected override void OnLaunched(LaunchActivatedEventArgs e)
50 | {
51 |
52 | #if DEBUG
53 | if (System.Diagnostics.Debugger.IsAttached)
54 | {
55 | this.DebugSettings.EnableFrameRateCounter = true;
56 | }
57 | #endif
58 |
59 | Frame rootFrame = Window.Current.Content as Frame;
60 |
61 | // Do not repeat app initialization when the Window already has content,
62 | // just ensure that the window is active
63 | if (rootFrame == null)
64 | {
65 | // Create a Frame to act as the navigation context and navigate to the first page
66 | rootFrame = new Frame();
67 |
68 | rootFrame.NavigationFailed += OnNavigationFailed;
69 |
70 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
71 | {
72 | //TODO: Load state from previously suspended application
73 | }
74 |
75 | // Place the frame in the current Window
76 | Window.Current.Content = rootFrame;
77 | }
78 |
79 | if (rootFrame.Content == null)
80 | {
81 | // When the navigation stack isn't restored navigate to the first page,
82 | // configuring the new page by passing required information as a navigation
83 | // parameter
84 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
85 | }
86 | // Ensure the current window is active
87 | Window.Current.Activate();
88 | }
89 |
90 | ///
91 | /// Invoked when Navigation to a certain page fails
92 | ///
93 | /// The Frame which failed navigation
94 | /// Details about the navigation failure
95 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
96 | {
97 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
98 | }
99 |
100 | ///
101 | /// Invoked when application execution is being suspended. Application state is saved
102 | /// without knowing whether the application will be terminated or resumed with the contents
103 | /// of memory still intact.
104 | ///
105 | /// The source of the suspend request.
106 | /// Details about the suspend request.
107 | private void OnSuspending(object sender, SuspendingEventArgs e)
108 | {
109 | var deferral = e.SuspendingOperation.GetDeferral();
110 | //TODO: Save application state and stop any background activity
111 | deferral.Complete();
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/AppServicesProvider.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}
8 | AppContainerExe
9 | Properties
10 | AppServicesProvider
11 | AppServicesProvider
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | AppServicesProvider_TemporaryKey.pfx
21 |
22 |
23 |
24 |
25 | true
26 | bin\ARM\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
28 | ;2008
29 | full
30 | ARM
31 | false
32 | prompt
33 | true
34 |
35 |
36 | bin\ARM\Release\
37 | TRACE;NETFX_CORE;WINDOWS_UAP
38 | true
39 | ;2008
40 | pdbonly
41 | ARM
42 | false
43 | prompt
44 | true
45 | true
46 |
47 |
48 | true
49 | bin\x64\Debug\
50 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
51 | ;2008
52 | full
53 | x64
54 | false
55 | prompt
56 | true
57 |
58 |
59 | bin\x64\Release\
60 | TRACE;NETFX_CORE;WINDOWS_UAP
61 | true
62 | ;2008
63 | pdbonly
64 | x64
65 | false
66 | prompt
67 | true
68 | true
69 |
70 |
71 | true
72 | bin\x86\Debug\
73 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
74 | ;2008
75 | full
76 | x86
77 | false
78 | prompt
79 | true
80 |
81 |
82 | bin\x86\Release\
83 | TRACE;NETFX_CORE;WINDOWS_UAP
84 | true
85 | ;2008
86 | pdbonly
87 | x86
88 | false
89 | prompt
90 | true
91 | true
92 |
93 |
94 |
95 | App.xaml
96 |
97 |
98 | MainPage.xaml
99 |
100 |
101 |
102 |
103 |
104 | Designer
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | MSBuild:Compile
120 | Designer
121 |
122 |
123 | MSBuild:Compile
124 | Designer
125 |
126 |
127 |
128 |
129 | ..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll
130 | True
131 |
132 |
133 | ..\packages\Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll
134 | True
135 |
136 |
137 | ..\packages\Microsoft.ApplicationInsights.PersistenceChannel.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll
138 | True
139 |
140 |
141 | ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll
142 | True
143 |
144 |
145 | ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll
146 | True
147 |
148 |
149 |
150 |
151 | {0c6759ac-3d99-477f-8cfc-bacf7254d94e}
152 | RandomNumberService
153 |
154 |
155 |
156 | 14.0
157 |
158 |
159 |
160 |
161 |
162 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
163 |
164 |
165 |
166 |
167 |
168 |
175 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/Win32AppServiceClient/AppServicesProvider/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/Win32AppServiceClient/AppServicesProvider/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/Win32AppServiceClient/AppServicesProvider/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/Win32AppServiceClient/AppServicesProvider/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Assets/WideLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunjeetsingh/SampleCode/434a48e215fbc0ece7e0b83c6fbee4ea1c44338d/Win32AppServiceClient/AppServicesProvider/Assets/WideLogo.scale-100.png
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 | This application provides an App Service called com.microsoft.randomnumbergenerator. The Package Family Name of this application is:
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
17 |
18 | namespace AppServicesProvider
19 | {
20 | ///
21 | /// An empty page that can be used on its own or navigated to within a Frame.
22 | ///
23 | public sealed partial class MainPage : Page
24 | {
25 | public MainPage()
26 | {
27 | this.InitializeComponent();
28 | }
29 |
30 | protected override void OnNavigatedTo(NavigationEventArgs e)
31 | {
32 | PackageFamilyName.Text = Windows.ApplicationModel.Package.Current.Id.FamilyName;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | AppServicesProvider
18 | arsingh
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AppServicesProvider")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AppServicesProvider")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/AppServicesProvider/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/README.md:
--------------------------------------------------------------------------------
1 | # Win32 AppService Client
2 |
3 | This sample demostrates a Windows Presentation Foundation (WPF) app calling a
4 | universal app service. App services are a new feature of universal Windows 10
5 | apps that allow an app to provide services to other apps. These services can
6 | be accessed by other apps as well as Win32 apps such as WPF or WinForms apps.
7 |
8 | This sample demonstrates how a WPF app can call into an app service. To run
9 | the sample you will need Visual Studio 2015 and the Windows SDK. Both of these
10 | can be found at .
11 |
12 | With Visual Studio, open the solution Win32AppServiceClient.sln. There are three
13 | projects in this solution:
14 | * **RandomNumberService** - This project is a Windows Runtime component. It contains
15 | the code for the background task that implements the app service we use for the
16 | sample. RandomNumberGeneratorTask.cs contains the background task class. The
17 | background tasks' main entrypoint is the Run method. In this method, the
18 | RandomNumberGeneratorTask sets itself up with a deferral so it can stay running
19 | and provide the app service. It also uses the incoming AppServiceTriggerDetails
20 | to attach an event handler to the AppServiceTriggerDetails.RequestReceived event.
21 | This enables the RandomNumberGeneratprTask to respond to requests from the app
22 | service client. The OnRequestReceived handler simply parses the input for minimum
23 | and maximum integer values. It then generates a random number between those values
24 | and returns it.
25 |
26 | * **AppServicesProvider** - AppServicesProvider is the universal Windows app that
27 | contains RandomNumberService. The AppServicesProvider project contains a reference to
28 | **RandomNumberService**. The Package.appxmanifest file in AppServicesProvider also
29 | contains a windows.appService extension. This is how the AppServicesProvider app
30 | exposes the RandomNumberService to other apps. In the Package.appxmanifest's uap:Extension
31 | element the EntryPoint attribute represents the type name of the background
32 | task providing the app service. The Name attribute in the uap:AppService element
33 | represents the name of the app service.
34 |
35 | * **Win32AppServiceClient** - The Win32AppServicesClient is a WPF application. The
36 | project file of this WPF application (Win32AppServiceClient.csproj) has been modified
37 | to include references to the universal Windows 10 APIs. This enables us to use the
38 | Windows.ApplicationModel.AppService.AppServiceConnection class that lets an app
39 | connect to an app service. The MainWindow.xaml page of Win32AppServiceClient does
40 | exactly that. It presents the user the option to provide minimum and maximum integer
41 | values. The Click handler of the *Generate Random Number* button then calls the
42 | random number service exposed by AppServicesProvider with these values. The result
43 | is then displayed on screen.
44 |
45 | Feel free to submit pull requests on this README.md or the code if you think it could
46 | use improvement. Happy hacking!
47 |
48 | [@aruntalkstech](https://twitter.com/aruntalkstech)
--------------------------------------------------------------------------------
/Win32AppServiceClient/RandomNumberService/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("RandomNumberService")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("RandomNumberService")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Win32AppServiceClient/RandomNumberService/RandomNumberGeneratorTask.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Windows.ApplicationModel.AppService;
7 | using Windows.ApplicationModel.Background;
8 | using Windows.Foundation.Collections;
9 |
10 | namespace RandomNumberService
11 | {
12 | public sealed class RandomNumberGeneratorTask : IBackgroundTask
13 | {
14 | BackgroundTaskDeferral serviceDeferral;
15 | AppServiceConnection connection;
16 | Random randomNumberGenerator;
17 |
18 | public void Run(IBackgroundTaskInstance taskInstance)
19 | {
20 | //Take a service deferral so the service isn't terminated
21 | serviceDeferral = taskInstance.GetDeferral();
22 |
23 | taskInstance.Canceled += OnTaskCanceled;
24 |
25 | //Initialize the random number generator
26 | randomNumberGenerator = new Random((int)DateTime.Now.Ticks);
27 |
28 | var details = taskInstance.TriggerDetails as AppServiceTriggerDetails;
29 | connection = details.AppServiceConnection;
30 |
31 | //Listen for incoming app service requests
32 | connection.RequestReceived += OnRequestReceived;
33 | }
34 |
35 | private void OnTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)
36 | {
37 | if (serviceDeferral != null)
38 | {
39 | //Complete the service deferral
40 | serviceDeferral.Complete();
41 | serviceDeferral = null;
42 | }
43 | }
44 |
45 | async void OnRequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args)
46 | {
47 | //Get a deferral so we can use an awaitable API to respond to the message
48 | var messageDeferral = args.GetDeferral();
49 |
50 | try
51 | {
52 | var input = args.Request.Message;
53 | int minValue = (int)input["minvalue"];
54 | int maxValue = (int)input["maxvalue"];
55 |
56 | //Create the response
57 | var result = new ValueSet();
58 | result.Add("result", randomNumberGenerator.Next(minValue, maxValue));
59 |
60 | //Send the response
61 | await args.Request.SendResponseAsync(result);
62 |
63 | }
64 | finally
65 | {
66 | //Complete the message deferral so the platform knows we're done responding
67 | messageDeferral.Complete();
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/RandomNumberService/RandomNumberService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}
8 | winmdobj
9 | Properties
10 | RandomNumberService
11 | RandomNumberService
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 | false
20 |
21 |
22 | AnyCPU
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
28 | prompt
29 | 4
30 |
31 |
32 | AnyCPU
33 | pdbonly
34 | true
35 | bin\Release\
36 | TRACE;NETFX_CORE;WINDOWS_UAP
37 | prompt
38 | 4
39 |
40 |
41 | ARM
42 | true
43 | bin\ARM\Debug\
44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
45 | ;2008
46 | full
47 | ARM
48 | false
49 | prompt
50 | true
51 |
52 |
53 | ARM
54 | bin\ARM\Release\
55 | TRACE;NETFX_CORE;WINDOWS_UAP
56 | true
57 | ;2008
58 | pdbonly
59 | ARM
60 | false
61 | prompt
62 | true
63 |
64 |
65 | x64
66 | true
67 | bin\x64\Debug\
68 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
69 | ;2008
70 | full
71 | x64
72 | false
73 | prompt
74 | true
75 |
76 |
77 | x64
78 | bin\x64\Release\
79 | TRACE;NETFX_CORE;WINDOWS_UAP
80 | true
81 | ;2008
82 | pdbonly
83 | x64
84 | false
85 | prompt
86 | true
87 |
88 |
89 | x86
90 | true
91 | bin\x86\Debug\
92 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP
93 | ;2008
94 | full
95 | x86
96 | false
97 | prompt
98 | true
99 |
100 |
101 | x86
102 | bin\x86\Release\
103 | TRACE;NETFX_CORE;WINDOWS_UAP
104 | true
105 | ;2008
106 | pdbonly
107 | x86
108 | false
109 | prompt
110 | true
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 | ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll
119 | True
120 |
121 |
122 | ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll
123 | True
124 |
125 |
126 |
127 |
128 |
129 |
130 | 14.0
131 |
132 |
133 |
140 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/RandomNumberService/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.22823.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win32AppServiceClient", "Win32AppServiceClient\Win32AppServiceClient.csproj", "{E32485F2-43BB-4941-AB0A-E81FBC385D89}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RandomNumberService", "RandomNumberService\RandomNumberService.csproj", "{0C6759AC-3D99-477F-8CFC-BACF7254D94E}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppServicesProvider", "AppServicesProvider\AppServicesProvider.csproj", "{2D9F3B36-BD7E-4D7F-955F-B522100F15CE}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Debug|ARM = Debug|ARM
16 | Debug|x64 = Debug|x64
17 | Debug|x86 = Debug|x86
18 | Release|Any CPU = Release|Any CPU
19 | Release|ARM = Release|ARM
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|ARM.ActiveCfg = Debug|Any CPU
27 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|ARM.Build.0 = Debug|Any CPU
28 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|x64.ActiveCfg = Debug|Any CPU
29 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|x64.Build.0 = Debug|Any CPU
30 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|x86.ActiveCfg = Debug|Any CPU
31 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Debug|x86.Build.0 = Debug|Any CPU
32 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|ARM.ActiveCfg = Release|Any CPU
35 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|ARM.Build.0 = Release|Any CPU
36 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|x64.ActiveCfg = Release|Any CPU
37 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|x64.Build.0 = Release|Any CPU
38 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|x86.ActiveCfg = Release|Any CPU
39 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}.Release|x86.Build.0 = Release|Any CPU
40 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|ARM.ActiveCfg = Debug|ARM
43 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|ARM.Build.0 = Debug|ARM
44 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|x64.ActiveCfg = Debug|x64
45 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|x64.Build.0 = Debug|x64
46 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|x86.ActiveCfg = Debug|x86
47 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Debug|x86.Build.0 = Debug|x86
48 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|Any CPU.ActiveCfg = Release|Any CPU
49 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|Any CPU.Build.0 = Release|Any CPU
50 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|ARM.ActiveCfg = Release|ARM
51 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|ARM.Build.0 = Release|ARM
52 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|x64.ActiveCfg = Release|x64
53 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|x64.Build.0 = Release|x64
54 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|x86.ActiveCfg = Release|x86
55 | {0C6759AC-3D99-477F-8CFC-BACF7254D94E}.Release|x86.Build.0 = Release|x86
56 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|Any CPU.ActiveCfg = Debug|x86
57 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|ARM.ActiveCfg = Debug|ARM
58 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|ARM.Build.0 = Debug|ARM
59 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|ARM.Deploy.0 = Debug|ARM
60 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x64.ActiveCfg = Debug|x64
61 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x64.Build.0 = Debug|x64
62 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x64.Deploy.0 = Debug|x64
63 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x86.ActiveCfg = Debug|x86
64 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x86.Build.0 = Debug|x86
65 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Debug|x86.Deploy.0 = Debug|x86
66 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|Any CPU.ActiveCfg = Release|x86
67 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|ARM.ActiveCfg = Release|ARM
68 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|ARM.Build.0 = Release|ARM
69 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|ARM.Deploy.0 = Release|ARM
70 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x64.ActiveCfg = Release|x64
71 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x64.Build.0 = Release|x64
72 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x64.Deploy.0 = Release|x64
73 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x86.ActiveCfg = Release|x86
74 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x86.Build.0 = Release|x86
75 | {2D9F3B36-BD7E-4D7F-955F-B522100F15CE}.Release|x86.Deploy.0 = Release|x86
76 | EndGlobalSection
77 | GlobalSection(SolutionProperties) = preSolution
78 | HideSolutionNode = FALSE
79 | EndGlobalSection
80 | EndGlobal
81 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Win32AppServiceClient
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Open a connection to an app service that can generate a random
20 | number between a minimum value and maximum value. Generates the
21 | random number and then closes the connection by disposing the
22 | AppServiceConnection.
23 |
24 |
25 | Tap or click Generate Random Number to
26 | generate a random number.
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 | using Windows.ApplicationModel.AppService;
16 | using Windows.Foundation.Collections;
17 |
18 | namespace Win32AppServiceClient
19 | {
20 | ///
21 | /// Interaction logic for MainWindow.xaml
22 | ///
23 | public partial class MainWindow : Window
24 | {
25 | public MainWindow()
26 | {
27 | InitializeComponent();
28 | }
29 |
30 | private async void GenerateRandomNumber_Click(object sender, RoutedEventArgs e)
31 | {
32 | //Parse user input
33 | int minValueInput = 0;
34 | bool valueParsed = int.TryParse(MinValue.Text, out minValueInput);
35 | if (!valueParsed)
36 | {
37 | NotifyUser("The Minimum Value should be a valid integer", NotifyType.ErrorMessage);
38 | return;
39 | }
40 |
41 | int maxValueInput = 0;
42 | valueParsed = int.TryParse(MaxValue.Text, out maxValueInput);
43 | if (!valueParsed)
44 | {
45 | NotifyUser("The Maximum Value should be a valid integer", NotifyType.ErrorMessage);
46 | return;
47 | }
48 |
49 | if (maxValueInput <= minValueInput)
50 | {
51 | NotifyUser("Maximum Value must be larger than Minimum Value", NotifyType.ErrorMessage);
52 | return;
53 | }
54 |
55 | using (var connection = new AppServiceConnection())
56 | {
57 | //Set up a new app service connection
58 | connection.AppServiceName = "com.microsoft.randomnumbergenerator";
59 | connection.PackageFamilyName = "Microsoft.SDKSamples.AppServicesProvider.CS_876gvmnfevegr";
60 |
61 | AppServiceConnectionStatus status = await connection.OpenAsync();
62 |
63 | //The new connection opened successfully
64 | if (status == AppServiceConnectionStatus.Success)
65 | {
66 | NotifyUser("Connection established", NotifyType.StatusMessage);
67 | }
68 |
69 | //If something went wrong. Lets figure out what it was and show the
70 | //user a meaningful message and walk away
71 | switch (status)
72 | {
73 | case AppServiceConnectionStatus.AppNotInstalled:
74 | NotifyUser("The app AppServicesProvider is not installed. Deploy AppServicesProvider to this device and try again.", NotifyType.ErrorMessage);
75 | return;
76 |
77 | case AppServiceConnectionStatus.AppUnavailable:
78 | NotifyUser("The app AppServicesProvider is not available. This could be because it is currently being updated or was installed to a removable device that is no longer available.", NotifyType.ErrorMessage);
79 | return;
80 |
81 | case AppServiceConnectionStatus.AppServiceUnavailable:
82 | NotifyUser(string.Format("The app AppServicesProvider is installed but it does not provide the app service {0}.", connection.AppServiceName), NotifyType.ErrorMessage);
83 | return;
84 |
85 | case AppServiceConnectionStatus.Unknown:
86 | NotifyUser("An unkown error occurred while we were trying to open an AppServiceConnection.", NotifyType.ErrorMessage);
87 | return;
88 | }
89 |
90 | //Set up the inputs and send a message to the service
91 | var inputs = new ValueSet();
92 | inputs.Add("minvalue", minValueInput);
93 | inputs.Add("maxvalue", maxValueInput);
94 | AppServiceResponse response = await connection.SendMessageAsync(inputs);
95 |
96 | //If the service responded with success display the result and walk away
97 | if (response.Status == AppServiceResponseStatus.Success &&
98 | response.Message.ContainsKey("result"))
99 | {
100 | var resultText = response.Message["result"].ToString();
101 | if (!string.IsNullOrEmpty(resultText))
102 | {
103 | Result.Text = resultText;
104 | NotifyUser("App service responded with a result", NotifyType.StatusMessage);
105 | }
106 | else
107 | {
108 | NotifyUser("App service did not respond with a result", NotifyType.ErrorMessage);
109 | }
110 |
111 | return;
112 | }
113 |
114 | //Something went wrong while sending a message. Let display
115 | //a meaningful error message
116 | switch (response.Status)
117 | {
118 | case AppServiceResponseStatus.Failure:
119 | NotifyUser("The service failed to acknowledge the message we sent it. It may have been terminated or it's RequestReceived handler might not be handling incoming messages correctly.", NotifyType.ErrorMessage);
120 | return;
121 |
122 | case AppServiceResponseStatus.ResourceLimitsExceeded:
123 | NotifyUser("The service exceeded the resources allocated to it and had to be terminated.", NotifyType.ErrorMessage);
124 | return;
125 |
126 | case AppServiceResponseStatus.Unknown:
127 | NotifyUser("An unkown error occurred while we were trying to send a message to the service.", NotifyType.ErrorMessage);
128 | return;
129 | }
130 | }
131 | }
132 |
133 | ///
134 | /// Used to display messages to the user
135 | ///
136 | ///
137 | ///
138 | public void NotifyUser(string strMessage, NotifyType type)
139 | {
140 | switch (type)
141 | {
142 | case NotifyType.StatusMessage:
143 | StatusBorder.Background = new SolidColorBrush(Colors.Green);
144 | break;
145 | case NotifyType.ErrorMessage:
146 | StatusBorder.Background = new SolidColorBrush(Colors.Red);
147 | break;
148 | }
149 |
150 | StatusBlock.Text = strMessage;
151 | }
152 | }
153 |
154 | public enum NotifyType
155 | {
156 | StatusMessage,
157 | ErrorMessage
158 | };
159 | }
160 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("Win32AppServiceClient")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("Win32AppServiceClient")]
15 | [assembly: AssemblyCopyright("Copyright © 2015")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Win32AppServiceClient.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Win32AppServiceClient.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Win32AppServiceClient.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Win32AppServiceClient/Win32AppServiceClient/Win32AppServiceClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E32485F2-43BB-4941-AB0A-E81FBC385D89}
8 | WinExe
9 | Properties
10 | Win32AppServiceClient
11 | Win32AppServiceClient
12 | v4.5.2
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | False
44 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.dll
45 |
46 |
47 | False
48 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
49 |
50 |
51 | C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 4.0
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | MSBuild:Compile
71 | Designer
72 |
73 |
74 | MSBuild:Compile
75 | Designer
76 |
77 |
78 | App.xaml
79 | Code
80 |
81 |
82 | MainWindow.xaml
83 | Code
84 |
85 |
86 |
87 |
88 | Code
89 |
90 |
91 | True
92 | True
93 | Resources.resx
94 |
95 |
96 | True
97 | Settings.settings
98 | True
99 |
100 |
101 | ResXFileCodeGenerator
102 | Resources.Designer.cs
103 |
104 |
105 | SettingsSingleFileGenerator
106 | Settings.Designer.cs
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
121 |
--------------------------------------------------------------------------------