├── .gitattributes ├── .gitignore ├── CortanaService ├── CortanaService.csproj ├── Properties │ └── AssemblyInfo.cs ├── Service.cs └── project.json ├── ExtensibilitySample.sln ├── ExtensibilitySample ├── App.xaml ├── App.xaml.cs ├── ApplicationInsights.config ├── Assets │ ├── BadgeLogo.scale-100.png │ ├── BadgeLogo.scale-200.png │ ├── BadgeLogo.scale-400.png │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── EditorTab.xaml ├── EditorTab.xaml.cs ├── ExtensibilitySample.csproj ├── ExtensibilitySampleCommands.xml ├── ExtensionManager.cs ├── ExtensionsTab.xaml ├── ExtensionsTab.xaml.cs ├── Image.xaml ├── Image.xaml.cs ├── ImageTools.cs ├── MainPage.xaml ├── MainPage.xaml.cs ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── Styles │ └── Styles.xaml ├── Tab.cs └── project.json ├── README.md └── SECURITY.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /CortanaService/CortanaService.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {480969FC-1CBC-490D-B741-79D79C96B838} 8 | winmdobj 9 | Properties 10 | CortanaService 11 | CortanaService 12 | en-US 13 | UAP 14 | 10.0.14393.0 15 | 10.0.14393.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_UWP 28 | prompt 29 | 4 30 | 31 | 32 | AnyCPU 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE;NETFX_CORE;WINDOWS_UWP 37 | prompt 38 | 4 39 | 40 | 41 | x86 42 | true 43 | bin\x86\Debug\ 44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 45 | ;2008 46 | full 47 | x86 48 | false 49 | prompt 50 | 51 | 52 | x86 53 | bin\x86\Release\ 54 | TRACE;NETFX_CORE;WINDOWS_UWP 55 | true 56 | ;2008 57 | pdbonly 58 | x86 59 | false 60 | prompt 61 | 62 | 63 | ARM 64 | true 65 | bin\ARM\Debug\ 66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 67 | ;2008 68 | full 69 | ARM 70 | false 71 | prompt 72 | 73 | 74 | ARM 75 | bin\ARM\Release\ 76 | TRACE;NETFX_CORE;WINDOWS_UWP 77 | true 78 | ;2008 79 | pdbonly 80 | ARM 81 | false 82 | prompt 83 | 84 | 85 | x64 86 | true 87 | bin\x64\Debug\ 88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 89 | ;2008 90 | full 91 | x64 92 | false 93 | prompt 94 | 95 | 96 | x64 97 | bin\x64\Release\ 98 | TRACE;NETFX_CORE;WINDOWS_UWP 99 | true 100 | ;2008 101 | pdbonly 102 | x64 103 | false 104 | prompt 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 14.0 116 | 117 | 118 | 125 | -------------------------------------------------------------------------------- /CortanaService/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("CortanaService")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CortanaService")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 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)] -------------------------------------------------------------------------------- /CortanaService/Service.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using Windows.ApplicationModel.AppService; 5 | using Windows.ApplicationModel.Background; 6 | using Windows.ApplicationModel.VoiceCommands; 7 | using Windows.UI.Xaml.Media.Imaging; 8 | 9 | namespace CortanaService 10 | { 11 | public sealed class Service : XamlRenderingBackgroundTask 12 | { 13 | private BackgroundTaskDeferral serviceDeferral; 14 | VoiceCommandServiceConnection voiceServiceConnection; 15 | 16 | protected override async void OnRun(IBackgroundTaskInstance taskInstance) 17 | { 18 | this.serviceDeferral = taskInstance.GetDeferral(); 19 | taskInstance.Canceled += OnTaskCanceled; 20 | 21 | var triggerDetails = taskInstance.TriggerDetails as AppServiceTriggerDetails; 22 | 23 | VoiceCommandResponse response; 24 | try 25 | { 26 | voiceServiceConnection = VoiceCommandServiceConnection.FromAppServiceTriggerDetails(triggerDetails); 27 | voiceServiceConnection.VoiceCommandCompleted += VoiceCommandCompleted; 28 | VoiceCommand voiceCommand = await voiceServiceConnection.GetVoiceCommandAsync(); 29 | 30 | switch (voiceCommand.CommandName) 31 | { 32 | 33 | case "sendMessageInCanvas": 34 | 35 | var responseMessage = new VoiceCommandUserMessage(); 36 | responseMessage.DisplayMessage = responseMessage.SpokenMessage = "Testing Cortana App Service"; 37 | 38 | response = VoiceCommandResponse.CreateResponse(responseMessage); 39 | await voiceServiceConnection.ReportSuccessAsync(response); 40 | 41 | break; 42 | 43 | } 44 | } 45 | catch (Exception ex) 46 | { 47 | Debug.WriteLine(ex.Message); 48 | } 49 | finally 50 | { 51 | if (this.serviceDeferral != null) 52 | { 53 | //Complete the service deferral 54 | this.serviceDeferral.Complete(); 55 | } 56 | } 57 | 58 | } 59 | 60 | private void VoiceCommandCompleted(VoiceCommandServiceConnection sender, 61 | VoiceCommandCompletedEventArgs args) 62 | { 63 | if (this.serviceDeferral != null) 64 | { 65 | this.serviceDeferral.Complete(); 66 | } 67 | } 68 | 69 | private void OnTaskCanceled(IBackgroundTaskInstance sender, 70 | BackgroundTaskCancellationReason reason) 71 | { 72 | if (this.serviceDeferral != null) 73 | { 74 | this.serviceDeferral.Complete(); 75 | } 76 | } 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /CortanaService/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 | } -------------------------------------------------------------------------------- /ExtensibilitySample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtensibilitySample", "ExtensibilitySample\ExtensibilitySample.csproj", "{1D5E07CA-CF4D-49B8-8672-46618FC02306}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CortanaService", "CortanaService\CortanaService.csproj", "{480969FC-1CBC-490D-B741-79D79C96B838}" 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 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|Any CPU.ActiveCfg = Debug|x86 23 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|ARM.ActiveCfg = Debug|ARM 24 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|ARM.Build.0 = Debug|ARM 25 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|ARM.Deploy.0 = Debug|ARM 26 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x64.ActiveCfg = Debug|x64 27 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x64.Build.0 = Debug|x64 28 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x64.Deploy.0 = Debug|x64 29 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x86.ActiveCfg = Debug|x86 30 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x86.Build.0 = Debug|x86 31 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Debug|x86.Deploy.0 = Debug|x86 32 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|Any CPU.ActiveCfg = Release|x86 33 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|ARM.ActiveCfg = Release|ARM 34 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|ARM.Build.0 = Release|ARM 35 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|ARM.Deploy.0 = Release|ARM 36 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x64.ActiveCfg = Release|x64 37 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x64.Build.0 = Release|x64 38 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x64.Deploy.0 = Release|x64 39 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x86.ActiveCfg = Release|x86 40 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x86.Build.0 = Release|x86 41 | {1D5E07CA-CF4D-49B8-8672-46618FC02306}.Release|x86.Deploy.0 = Release|x86 42 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|ARM.ActiveCfg = Debug|ARM 45 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|ARM.Build.0 = Debug|ARM 46 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|x64.ActiveCfg = Debug|x64 47 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|x64.Build.0 = Debug|x64 48 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|x86.ActiveCfg = Debug|x86 49 | {480969FC-1CBC-490D-B741-79D79C96B838}.Debug|x86.Build.0 = Debug|x86 50 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|Any CPU.ActiveCfg = Release|Any CPU 51 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|Any CPU.Build.0 = Release|Any CPU 52 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|ARM.ActiveCfg = Release|ARM 53 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|ARM.Build.0 = Release|ARM 54 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|x64.ActiveCfg = Release|x64 55 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|x64.Build.0 = Release|x64 56 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|x86.ActiveCfg = Release|x86 57 | {480969FC-1CBC-490D-B741-79D79C96B838}.Release|x86.Build.0 = Release|x86 58 | EndGlobalSection 59 | GlobalSection(SolutionProperties) = preSolution 60 | HideSolutionNode = FALSE 61 | EndGlobalSection 62 | EndGlobal 63 | -------------------------------------------------------------------------------- /ExtensibilitySample/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ExtensibilitySample/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.Storage; 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.Media.Imaging; 18 | using Windows.UI.Xaml.Navigation; 19 | 20 | namespace ExtensibilitySample 21 | { 22 | 23 | public static class AppData 24 | { 25 | // create extensions list 26 | private static ExtensionManager extensionManager = new ExtensionManager("build2016.appextensibility.demo"); 27 | 28 | // create the current editing image 29 | public static WriteableBitmap currentImage = new WriteableBitmap(1, 1); 30 | public static string currentImageString = null; 31 | 32 | internal static ExtensionManager ExtensionManager 33 | { 34 | get 35 | { 36 | return extensionManager; 37 | } 38 | 39 | set 40 | { 41 | extensionManager = value; 42 | } 43 | } 44 | } 45 | 46 | /// 47 | /// Provides application-specific behavior to supplement the default Application class. 48 | /// 49 | sealed partial class App : Application 50 | { 51 | /// 52 | /// Initializes the singleton application object. This is the first line of authored code 53 | /// executed, and as such is the logical equivalent of main() or WinMain(). 54 | /// 55 | public App() 56 | { 57 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( 58 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata | 59 | Microsoft.ApplicationInsights.WindowsCollectors.Session); 60 | this.InitializeComponent(); 61 | this.Suspending += OnSuspending; 62 | } 63 | 64 | /// 65 | /// Invoked when the application is launched normally by the end user. Other entry points 66 | /// will be used such as when the application is launched to open a specific file. 67 | /// 68 | /// Details about the launch request and process. 69 | protected async override void OnLaunched(LaunchActivatedEventArgs e) 70 | { 71 | 72 | 73 | #if DEBUG 74 | if (System.Diagnostics.Debugger.IsAttached) 75 | { 76 | this.DebugSettings.EnableFrameRateCounter = true; 77 | } 78 | #endif 79 | 80 | try 81 | { 82 | // Install the VCD. 83 | StorageFile vcdStorageFile = 84 | await Package.Current.InstalledLocation.GetFileAsync( 85 | @"ExtensibilitySampleCommands.xml"); 86 | 87 | await 88 | Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager. 89 | InstallCommandDefinitionsFromStorageFileAsync(vcdStorageFile); 90 | } 91 | catch (Exception ex) 92 | { 93 | System.Diagnostics.Debug.WriteLine( 94 | "Installing Voice Commands Failed: " + ex.ToString()); 95 | } 96 | 97 | Frame rootFrame = Window.Current.Content as Frame; 98 | 99 | // Do not repeat app initialization when the Window already has content, 100 | // just ensure that the window is active 101 | if (rootFrame == null) 102 | { 103 | // Create a Frame to act as the navigation context and navigate to the first page 104 | rootFrame = new Frame(); 105 | 106 | rootFrame.NavigationFailed += OnNavigationFailed; 107 | 108 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 109 | { 110 | //TODO: Load state from previously suspended application 111 | } 112 | 113 | // Place the frame in the current Window 114 | Window.Current.Content = rootFrame; 115 | } 116 | 117 | if (rootFrame.Content == null) 118 | { 119 | // When the navigation stack isn't restored navigate to the first page, 120 | // configuring the new page by passing required information as a navigation 121 | // parameter 122 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 123 | } 124 | // Ensure the current window is active 125 | Window.Current.Activate(); 126 | } 127 | 128 | /// 129 | /// Invoked when Navigation to a certain page fails 130 | /// 131 | /// The Frame which failed navigation 132 | /// Details about the navigation failure 133 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 134 | { 135 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 136 | } 137 | 138 | /// 139 | /// Invoked when application execution is being suspended. Application state is saved 140 | /// without knowing whether the application will be terminated or resumed with the contents 141 | /// of memory still intact. 142 | /// 143 | /// The source of the suspend request. 144 | /// Details about the suspend request. 145 | private void OnSuspending(object sender, SuspendingEventArgs e) 146 | { 147 | var deferral = e.SuspendingOperation.GetDeferral(); 148 | //TODO: Save application state and stop any background activity 149 | deferral.Complete(); 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /ExtensibilitySample/ApplicationInsights.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/BadgeLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/BadgeLogo.scale-100.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/BadgeLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/BadgeLogo.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/BadgeLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/BadgeLogo.scale-400.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/StoreLogo.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /ExtensibilitySample/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/App-Extensibility-Sample/de344726d28bd75bc8cf3fd34099d093d8a6bc3e/ExtensibilitySample/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /ExtensibilitySample/EditorTab.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | 89 | 94 | 95 | 102 | 103 | 104 | 107 | 108 | 109 | 110 | 111 | 116 | 117 | 118 | 119 | 120 | 127 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ExtensibilitySample/ExtensionsTab.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.InteropServices.WindowsRuntime; 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 ExtensibilitySample 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 ExtensionsTab : Page 25 | { 26 | 27 | public ObservableCollection Items = null; 28 | public ObservableCollection Suggestions { get; private set; } 29 | 30 | public ExtensionsTab() 31 | { 32 | this.InitializeComponent(); 33 | 34 | this.Suggestions = new ObservableCollection(); 35 | 36 | Items = AppData.ExtensionManager.Extensions; 37 | this.DataContext = Items; 38 | } 39 | 40 | private void BackButton_Click(object sender, RoutedEventArgs e) 41 | { 42 | if (this.Frame.CanGoBack) 43 | this.Frame.GoBack(); 44 | } 45 | 46 | private async void CheckBox_Checked(object sender, RoutedEventArgs e) 47 | { 48 | CheckBox cb = sender as CheckBox; 49 | Extension ext = cb.DataContext as Extension; 50 | if (!ext.Enabled) 51 | { 52 | await ext.Enable(); 53 | } 54 | } 55 | 56 | private void CheckBox_Unchecked(object sender, RoutedEventArgs e) 57 | { 58 | CheckBox cb = sender as CheckBox; 59 | Extension ext = cb.DataContext as Extension; 60 | if (ext.Enabled) 61 | { 62 | ext.Disable(); 63 | } 64 | } 65 | 66 | private void RemoveButton_Click(object sender, RoutedEventArgs e) 67 | { 68 | // remove the package 69 | Button btn = sender as Button; 70 | Extension ext = btn.DataContext as Extension; 71 | AppData.ExtensionManager.RemoveExtension(ext); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ExtensibilitySample/Image.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ExtensibilitySample/Image.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=234238 17 | 18 | namespace ExtensibilitySample 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 Image : Page 24 | { 25 | public Image() 26 | { 27 | this.InitializeComponent(); 28 | 29 | DataContext = AppData.currentImage; 30 | 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ExtensibilitySample/ImageTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Runtime.InteropServices.WindowsRuntime; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.Graphics.Imaging; 8 | using Windows.Storage; 9 | using Windows.Storage.Streams; 10 | using Windows.UI.Xaml.Media.Imaging; 11 | 12 | namespace ExtensibilitySample 13 | { 14 | class ImageTools 15 | { 16 | // adds data uri header to the encoded string for png image 17 | public static string AddDataURIHeader(string encodedString) 18 | { 19 | return "data:image/png;base64," + encodedString; 20 | } 21 | 22 | // converts data URL into the raw string to convert 23 | // this just strips the data URI 24 | public static string StripDataURIHeader(string url) 25 | { 26 | StringBuilder sb = new StringBuilder(url, url.Length); 27 | sb.Replace("data:image/png;base64,", String.Empty); 28 | 29 | // todo: better error checking 30 | 31 | return sb.ToString(); 32 | } 33 | 34 | // Converts file to b64 string encoded as a PNG 35 | // regardless of what the input is, it is converted to a PNG in this process :) 36 | public static async Task FileToString(StorageFile source) 37 | { 38 | using (IRandomAccessStream fileStream = await source.OpenAsync(Windows.Storage.FileAccessMode.Read)) 39 | { 40 | var destStream = new InMemoryRandomAccessStream(); 41 | 42 | // decode the file stream 43 | var decoder = await Windows.Graphics.Imaging.BitmapDecoder.CreateAsync(fileStream); 44 | BitmapTransform transform = new BitmapTransform(); 45 | var pixelData = await decoder.GetPixelDataAsync( 46 | BitmapPixelFormat.Bgra8, 47 | BitmapAlphaMode.Straight, 48 | transform, 49 | ExifOrientationMode.IgnoreExifOrientation, 50 | ColorManagementMode.DoNotColorManage 51 | ); 52 | 53 | // encode the bytes 54 | return await EncodeBytesToPNGString(pixelData.DetachPixelData(), decoder.PixelWidth, decoder.PixelHeight); 55 | } 56 | } 57 | 58 | // gets a byte array representing the pixels in a writeable bitmap 59 | public static byte[] GetBitmapBytes(WriteableBitmap bitmap) 60 | { 61 | using (MemoryStream ms = new MemoryStream()) 62 | { 63 | // copy pixel buffer to the memory buffer 64 | bitmap.PixelBuffer.AsStream().CopyTo(ms); 65 | 66 | // return buffer as byte array 67 | return ms.ToArray(); 68 | } 69 | } 70 | 71 | // encodes bytes into a b64 string in png format, must also specify height and width 72 | public static async Task EncodeBytesToPNGString(byte[] bytes, uint width, uint height) 73 | { 74 | using (IRandomAccessStream destStream = new InMemoryRandomAccessStream()) 75 | { 76 | // encoder, assumes input bytes are Bgra8 77 | var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, destStream); 78 | encoder.SetPixelData( 79 | BitmapPixelFormat.Bgra8, 80 | BitmapAlphaMode.Straight, 81 | width, 82 | height, 83 | 96, 84 | 96, 85 | bytes 86 | ); 87 | 88 | // encode 89 | await encoder.FlushAsync(); 90 | 91 | // convert the stream to bytes 92 | byte[] encodedBytes = new byte[destStream.Size]; 93 | destStream.AsStreamForRead().Read(encodedBytes, 0, (int)destStream.Size); 94 | 95 | // and finally encode the bytes to a string 96 | return Convert.ToBase64String(encodedBytes.ToArray()); 97 | } 98 | } 99 | 100 | // decode base 64 string into a bitmap 101 | // assumes the string represents an image 102 | public static IRandomAccessStream DecodeStringToBitmapSource(string base64String) 103 | { 104 | var rawBytes = Convert.FromBase64String(base64String); 105 | MemoryStream inputStream = new MemoryStream(rawBytes, 0, rawBytes.Length, false); 106 | return inputStream.AsRandomAccessStream(); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /ExtensibilitySample/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  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 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /ExtensibilitySample/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 ExtensibilitySample 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 static MainPage Current; 26 | 27 | public List Tabs 28 | { 29 | get { return this.tabs; } 30 | } 31 | public MainPage() 32 | { 33 | this.InitializeComponent(); 34 | 35 | AppData.ExtensionManager.Initialize(); 36 | 37 | Current = this; 38 | SampleTitle.Text = "Extensibility Sample"; 39 | } 40 | 41 | protected override void OnNavigatedTo(NavigationEventArgs e) 42 | { 43 | // Populate the scenario list from the SampleConfiguration.cs file 44 | ScenarioControl.ItemsSource = tabs; 45 | if (Window.Current.Bounds.Width < 640) 46 | { 47 | ScenarioControl.SelectedIndex = -1; 48 | } 49 | else 50 | { 51 | ScenarioControl.SelectedIndex = 0; 52 | } 53 | } 54 | 55 | private void ScenarioControl_SelectionChanged(object sender, SelectionChangedEventArgs e) 56 | { 57 | // Clear the status block when navigating scenarios. 58 | NotifyUser(String.Empty, NotifyType.StatusMessage); 59 | 60 | ListBox scenarioListBox = sender as ListBox; 61 | Tab s = scenarioListBox.SelectedItem as Tab; 62 | if (s != null) 63 | { 64 | ScenarioFrame.Navigate(s.ClassType); 65 | if (Window.Current.Bounds.Width < 640) 66 | { 67 | Splitter.IsPaneOpen = false; 68 | StatusBorder.Visibility = Visibility.Collapsed; 69 | } 70 | } 71 | } 72 | 73 | 74 | public void NotifyUser(string strMessage, NotifyType type) 75 | { 76 | switch (type) 77 | { 78 | case NotifyType.StatusMessage: 79 | StatusBorder.Background = new SolidColorBrush(Windows.UI.Colors.Green); 80 | break; 81 | case NotifyType.ErrorMessage: 82 | StatusBorder.Background = new SolidColorBrush(Windows.UI.Colors.Red); 83 | break; 84 | } 85 | StatusBlock.Text = strMessage; 86 | 87 | // Collapse the StatusBlock if it has no text to conserve real estate. 88 | StatusBorder.Visibility = (StatusBlock.Text != String.Empty) ? Visibility.Visible : Visibility.Collapsed; 89 | } 90 | 91 | async void Footer_Click(object sender, RoutedEventArgs e) 92 | { 93 | await Windows.System.Launcher.LaunchUriAsync(new Uri(((HyperlinkButton)sender).Tag.ToString())); 94 | } 95 | 96 | private void Button_Click(object sender, RoutedEventArgs e) 97 | { 98 | Splitter.IsPaneOpen = (Splitter.IsPaneOpen == true) ? false : true; 99 | StatusBorder.Visibility = Visibility.Collapsed; 100 | } 101 | 102 | } 103 | 104 | public enum NotifyType 105 | { 106 | StatusMessage, 107 | ErrorMessage 108 | }; 109 | 110 | public class ScenarioBindingConverter : IValueConverter 111 | { 112 | public object Convert(object value, Type targetType, object parameter, string language) 113 | { 114 | Tab s = value as Tab; 115 | return s.Title; 116 | } 117 | 118 | public object ConvertBack(object value, Type targetType, object parameter, string language) 119 | { 120 | return true; 121 | } 122 | } 123 | 124 | 125 | } 126 | -------------------------------------------------------------------------------- /ExtensibilitySample/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | App Extensibility Demo 7 | Microsoft Corporation 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 | build2016.appextensibility.demo 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ExtensibilitySample/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("ExtensibilitySample")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ExtensibilitySample")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 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)] -------------------------------------------------------------------------------- /ExtensibilitySample/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ExtensibilitySample/Styles/Styles.xaml: -------------------------------------------------------------------------------- 1 |  13 | 17 | 18 | 22 | 23 | 28 | 29 | 34 | 35 | 42 | 43 | 46 | 47 | 52 | 53 | 58 | 59 | 65 | 66 | 71 | 72 | 76 | 77 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /ExtensibilitySample/Tab.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Windows.UI.Xaml.Controls; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ExtensibilitySample 9 | { 10 | 11 | public partial class MainPage : Page 12 | { 13 | List tabs = new List 14 | { 15 | new Tab() { Title="Image Editor", ClassType=typeof(EditorTab) }, 16 | new Tab() { Title="Extensions", ClassType=typeof(ExtensionsTab) } 17 | }; 18 | } 19 | 20 | public class Tab 21 | { 22 | public string Title { get; set; } 23 | public Type ClassType { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ExtensibilitySample/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.ApplicationInsights": "1.0.0", 4 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0", 5 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0", 6 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" 7 | }, 8 | "frameworks": { 9 | "uap10.0": {} 10 | }, 11 | "runtimes": { 12 | "win10-arm": {}, 13 | "win10-arm-aot": {}, 14 | "win10-x86": {}, 15 | "win10-x86-aot": {}, 16 | "win10-x64": {}, 17 | "win10-x64-aot": {} 18 | } 19 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build2016-B808-AppExtensibilitySample 2 | This repo contains the sample shown during the App Extensibility Session during Build 2016 3 | 4 | After cloning the sample, open the solution in Visual Studio. Make sure you're on the Insider version of the Windows Anniversary Update(Build 14295) and you have the associated SDK. This sample is a complete App Extension Host and also shows cropping via LaunchURIForResultsAsync, and includes the Cortana App Service. 5 | 6 | To use actual app extensions, clone the following projects and deploy them from Visual Studio. They should automatically appear in the Extensions tab of the main application. 7 | 8 | Grayscale: 9 | https://github.com/anagamsft/Build2016-GrayscaleExtension 10 | 11 | Invert: 12 | https://github.com/anagamsft/Build2016-InvertExtension 13 | 14 | Rotate: 15 | https://github.com/anagamsft/RotateExtension 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | --------------------------------------------------------------------------------