diff --git a/README.md b/README.md
index fb4c213c48..25803a3503 100644
--- a/README.md
+++ b/README.md
@@ -146,46 +146,49 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
diff --git a/Samples/ContactCardIntegration/README.md b/Samples/ContactCardIntegration/README.md
new file mode 100644
index 0000000000..3a5c2015d6
--- /dev/null
+++ b/Samples/ContactCardIntegration/README.md
@@ -0,0 +1,58 @@
+
+
+# Contact Card integration sample
+
+This sample shows how to integrate your app into the People App's contact card and the Mini Contact card by using [**annotations**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactannotationlist.aspx).
+
+**Note** The Windows universal samples require Visual Studio 2015 to build and Windows 10 to execute.
+
+To obtain information about Windows 10 development, go to the [Windows Dev Center](https://dev.windows.com)
+
+To obtain information about Microsoft Visual Studio 2015 and the tools for developing Windows apps, go to [Visual Studio 2015](http://go.microsoft.com/fwlink/?LinkID=532422)
+
+## Related topics
+
+### Samples
+
+[**ContactCards**](../ContactCards)
+
+[**ContactPicker**](../ContactPicker)
+
+### Reference
+
+[**ContactAnnotationList**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactannotationlist.aspx)
+
+[**ContactAnnotation**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactannotation.aspx)
+
+[**Windows.ApplicationModel.Contacts**](http://msdn.microsoft.com/library/windows/apps/br225002)
+
+[**Handling URI activation (XAML)**](https://technet.microsoft.com/en-us/windowsserver/hh779670)
+
+## System requirements
+
+**Client:** Windows 10
+
+**Server:** Windows Server 2016 Technical Preview
+
+**Phone:** Windows 10
+
+## Build the sample
+
+1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
+2. Start Microsoft Visual Studio 2015 and select **File** \> **Open** \> **Project/Solution**.
+3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio?2015 Solution (.sln) file.
+4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.
+
+## Run the sample
+
+The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
+
+### Deploying the sample
+
+- Select Build > Deploy Solution.
+
+### Deploying and running the sample
+
+- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.
diff --git a/Samples/ContactCardIntegration/cs/ContactCardIntegration.csproj b/Samples/ContactCardIntegration/cs/ContactCardIntegration.csproj
new file mode 100644
index 0000000000..359afa2f44
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/ContactCardIntegration.csproj
@@ -0,0 +1,180 @@
+
+
+
+
+ Debug
+ x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}
+ AppContainerExe
+ Properties
+ SDKTemplate
+ ContactCardIntegration
+ en-US
+ UAP
+ 10.0.10240.0
+ 10.0.10240.0
+ 14
+ true
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+
+
+
+
+ App.xaml.cs
+ App.xaml
+
+
+ MainPage.xaml.cs
+ MainPage.xaml
+
+
+ Properties\AssemblyInfo.cs
+
+
+
+ Scenario1_CreateContacts.xaml
+
+
+ Scenario2_ReceiveContact.xaml
+
+
+
+
+ Designer
+
+
+
+
+ App.xaml
+ MSBuild:Compile
+ Designer
+
+
+ MainPage.xaml
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Styles\Styles.xaml
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Properties\Default.rd.xml
+
+
+ Assets\microsoft-sdk.png
+
+
+ Assets\smallTile-sdk.png
+
+
+ Assets\splash-sdk.png
+
+
+ Assets\squareTile-sdk.png
+
+
+ Assets\storeLogo-sdk.png
+
+
+ Assets\tile-sdk.png
+
+
+ Assets\windows-sdk.png
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file
diff --git a/Samples/ContactCardIntegration/cs/ContactCardIntegration.sln b/Samples/ContactCardIntegration/cs/ContactCardIntegration.sln
new file mode 100644
index 0000000000..f4d5c9b1b8
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/ContactCardIntegration.sln
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContactCardIntegration", "ContactCardIntegration.csproj", "{DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Build.0 = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Deploy.0 = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.ActiveCfg = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Build.0 = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Deploy.0 = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.ActiveCfg = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Build.0 = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Deploy.0 = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.ActiveCfg = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Build.0 = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Deploy.0 = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.ActiveCfg = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Build.0 = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Deploy.0 = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.ActiveCfg = Release|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Build.0 = Release|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/ContactCardIntegration/cs/Package.appxmanifest b/Samples/ContactCardIntegration/cs/Package.appxmanifest
new file mode 100644
index 0000000000..c7483738fb
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/Package.appxmanifest
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+ Contact Card Integration C# Sample
+ Microsoft Corporation
+ Assets\StoreLogo-sdk.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TestCallApp
+
+
+
+
+ TestVideoApp
+
+
+
+
+ TestMsgApp
+
+
+
+
+ TestProfileApp
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/ContactCardIntegration/cs/SampleConfiguration.cs b/Samples/ContactCardIntegration/cs/SampleConfiguration.cs
new file mode 100644
index 0000000000..1946c41d66
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/SampleConfiguration.cs
@@ -0,0 +1,71 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+//*********************************************************
+
+using System;
+using System.Collections.Generic;
+using Windows.ApplicationModel.Activation;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+
+namespace SDKTemplate
+{
+ public partial class MainPage : Page
+ {
+ public const string FEATURE_NAME = "Contact Card integration C# Sample";
+
+ List scenarios = new List
+ {
+ new Scenario() { Title="Create contacts with annotations", ClassType=typeof(Scenario1_CreateContacts)},
+ new Scenario() { Title="Receiving a contact", ClassType=typeof(Scenario2_ReceiveContact) },
+ };
+
+ public void NavigateToPageWithParameter(int pageIndex, object parameter)
+ {
+ ScenarioControl.SelectedIndex = pageIndex;
+ ScenarioFrame.Navigate(scenarios[pageIndex].ClassType, parameter);
+ }
+
+ }
+
+ public class Scenario
+ {
+ public string Title { get; set; }
+ public Type ClassType { get; set; }
+ }
+
+ public partial class App : Application
+ {
+ ///
+ // Handle protocol activations.
+ ///
+ protected override void OnActivated(IActivatedEventArgs e)
+ {
+ if (e.Kind == ActivationKind.Protocol)
+ {
+ Frame rootFrame = CreateRootFrame();
+
+ if (rootFrame.Content == null)
+ {
+ if (!rootFrame.Navigate(typeof(MainPage)))
+ {
+ throw new Exception("Failed to create initial page");
+ }
+ }
+
+ var p = rootFrame.Content as MainPage;
+ p.NavigateToPageWithParameter(1, e);
+
+ // Ensure the current window is active
+ Window.Current.Activate();
+ }
+ }
+ }
+}
diff --git a/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml b/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml
new file mode 100644
index 0000000000..b0df462021
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ Create test contacts with annotations
+
+
+
+
+
+ In the People app, go to the contact named TestContact1.
+ Viewing that contact's profile launches this application.
+
+
+
+ In the People app, go to the contact named TestContact2.
+ You can send a message using this app, place a call via this app,
+ or make a video call via this app.
+
+
+
+ When an app such as the ContactCards sample displays a mini contact card
+ for TestContact1 or TestContact2,
+ this app will appear as an available action.
+
+
+
+
+
+
+
+
diff --git a/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml.cs b/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml.cs
new file mode 100644
index 0000000000..49ff9b9b42
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml.cs
@@ -0,0 +1,196 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+//*********************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+using Windows.ApplicationModel.Contacts;
+
+namespace SDKTemplate
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class Scenario1_CreateContacts : Page
+ {
+ private MainPage rootPage = MainPage.Current;
+
+ public Scenario1_CreateContacts()
+ {
+ this.InitializeComponent();
+ }
+
+ private async Task _GetContactList()
+ {
+ ContactStore store = await ContactManager.RequestStoreAsync(ContactStoreAccessType.AppContactsReadWrite);
+ if (null == store)
+ {
+ rootPage.NotifyUser("Unable to get a contacts store.", NotifyType.ErrorMessage);
+ return null;
+ }
+
+ ContactList contactList;
+ IReadOnlyList contactLists = await store.FindContactListsAsync();
+ if (0 == contactLists.Count)
+ {
+ contactList = await store.CreateContactListAsync("TestContactList");
+ }
+ else
+ {
+ contactList = contactLists[0];
+ }
+
+ return contactList;
+ }
+
+ private async Task _GetContactAnnotationList()
+ {
+ ContactAnnotationStore annotationStore = await ContactManager.RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType.AppAnnotationsReadWrite);
+ if (null == annotationStore)
+ {
+ rootPage.NotifyUser("Unable to get an annotations store.", NotifyType.ErrorMessage);
+ return null;
+ }
+
+ ContactAnnotationList annotationList;
+ IReadOnlyList annotationLists = await annotationStore.FindAnnotationListsAsync();
+ if (0 == annotationLists.Count)
+ {
+ annotationList = await annotationStore.CreateAnnotationListAsync();
+ }
+ else
+ {
+ annotationList = annotationLists[0];
+ }
+
+ return annotationList;
+ }
+
+ private async void CreateTestContacts()
+ {
+ //
+ // Creating two test contacts with email address and phone number.
+ //
+
+ Contact contact1 = new Contact();
+ contact1.FirstName = "TestContact1";
+
+ ContactEmail email1 = new ContactEmail();
+ email1.Address = "TestContact1@contoso.com";
+ contact1.Emails.Add(email1);
+
+ ContactPhone phone1 = new ContactPhone();
+ phone1.Number = "4255550100";
+ contact1.Phones.Add(phone1);
+
+ Contact contact2 = new Contact();
+ contact2.FirstName = "TestContact2";
+
+ ContactEmail email2 = new ContactEmail();
+ email2.Address = "TestContact2@contoso.com";
+ email2.Kind = ContactEmailKind.Other;
+ contact2.Emails.Add(email2);
+
+ ContactPhone phone2 = new ContactPhone();
+ phone2.Number = "4255550101";
+ phone2.Kind = ContactPhoneKind.Mobile;
+ contact2.Phones.Add(phone2);
+
+ // Save the contacts
+ ContactList contactList = await _GetContactList();
+ if (null == contactList)
+ {
+ return;
+ }
+
+ await contactList.SaveContactAsync(contact1);
+ await contactList.SaveContactAsync(contact2);
+
+ //
+ // Create annotations for those test contacts.
+ // Annotation is the contact meta data that allows People App to generate deep links
+ // in the contact card that takes the user back into this app.
+ //
+
+ ContactAnnotationList annotationList = await _GetContactAnnotationList();
+ if (null == annotationList)
+ {
+ return;
+ }
+
+ ContactAnnotation annotation = new ContactAnnotation();
+ annotation.ContactId = contact1.Id;
+
+ // Remote ID: The identifier of the user relevant for this app. When this app is
+ // launched into from the People App, this id will be provided as context on which user
+ // the operation (e.g. ContactProfile) is for.
+ annotation.RemoteId = "user12";
+
+ // The supported operations flags indicate that this app can fulfill these operations
+ // for this contact. These flags are read by apps such as the People App to create deep
+ // links back into this app. This app must also be registered for the relevant
+ // protocols in the Package.appxmanifest (in this case, ms-contact-profile).
+ annotation.SupportedOperations = ContactAnnotationOperations.ContactProfile;
+
+ if (!await annotationList.TrySaveAnnotationAsync(annotation))
+ {
+ rootPage.NotifyUser("Failed to save annotation for TestContact1 to the store.", NotifyType.ErrorMessage);
+ return;
+ }
+
+ annotation = new ContactAnnotation();
+ annotation.ContactId = contact2.Id;
+ annotation.RemoteId = "user22";
+
+ // You can also specify multiple supported operations for a contact in a single
+ // annotation. In this case, this annotation indicates that the user can be
+ // communicated via VOIP call, Video Call, or IM via this application.
+ annotation.SupportedOperations = ContactAnnotationOperations.Message |
+ ContactAnnotationOperations.AudioCall |
+ ContactAnnotationOperations.VideoCall;
+
+ if (!await annotationList.TrySaveAnnotationAsync(annotation))
+ {
+ rootPage.NotifyUser("Failed to save annotation for TestContact2 to the store.", NotifyType.ErrorMessage);
+ return;
+ }
+
+ rootPage.NotifyUser("Sample data created successfully.", NotifyType.StatusMessage);
+ }
+
+ private async void DeleteTestContacts()
+ {
+ ContactList contactList = null;
+ ContactStore store = await ContactManager.RequestStoreAsync(ContactStoreAccessType.AppContactsReadWrite);
+ if (null != store)
+ {
+ IReadOnlyList contactLists = await store.FindContactListsAsync();
+ if (0 < contactLists.Count)
+ {
+ contactList = contactLists[0];
+ }
+ }
+
+ if (null != contactList)
+ {
+ await contactList.DeleteAsync();
+ rootPage.NotifyUser("Sample data deleted.", NotifyType.StatusMessage);
+ }
+ else
+ {
+ rootPage.NotifyUser("Could not delete sample data.", NotifyType.ErrorMessage);
+ }
+ }
+ }
+}
diff --git a/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml b/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml
new file mode 100644
index 0000000000..dc28365b45
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+ Receiving a contact
+
+
+
+ Use the People app or a mini contact card as described in Scenario 1
+ to activate this application with a contact.
+
+
+
+
+
diff --git a/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml.cs b/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml.cs
new file mode 100644
index 0000000000..51ad26b12f
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml.cs
@@ -0,0 +1,47 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+//*********************************************************
+
+using System;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+using Windows.ApplicationModel.Activation;
+
+// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace SDKTemplate
+{
+ ///
+ /// Page to handle the protocol activation. In this case we simply show the URI and the
+ /// parameters passed to it.
+ ///
+ public sealed partial class Scenario2_ReceiveContact : Page
+ {
+ public Scenario2_ReceiveContact()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ var args = e.Parameter as ProtocolActivatedEventArgs;
+ // Display the result of the protocol activation if we got here as a result of being activated for a protocol.
+ if (args != null)
+ {
+ // Parse the URI to extract the protocol and the contact ids
+ Uri uri = args.Uri;
+
+ MainPage.Current.NotifyUser("Activated with protocol = " + uri.Scheme + ", parameters = " + uri.Query, NotifyType.StatusMessage);
+ }
+ }
+ }
+}
diff --git a/Samples/ContactCardIntegration/cs/project.json b/Samples/ContactCardIntegration/cs/project.json
new file mode 100644
index 0000000000..c594939270
--- /dev/null
+++ b/Samples/ContactCardIntegration/cs/project.json
@@ -0,0 +1,16 @@
+{
+ "dependencies": {
+ "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
+ },
+ "frameworks": {
+ "uap10.0": {}
+ },
+ "runtimes": {
+ "win10-arm": {},
+ "win10-arm-aot": {},
+ "win10-x86": {},
+ "win10-x86-aot": {},
+ "win10-x64": {},
+ "win10-x64-aot": {}
+ }
+}
\ No newline at end of file
diff --git a/Samples/EnterpriseDataProtection/cs/Tasks/EdpBackgroundTask.cs b/Samples/EnterpriseDataProtection/cs/Tasks/EdpBackgroundTask.cs
index 295e349211..d566b3b104 100644
--- a/Samples/EnterpriseDataProtection/cs/Tasks/EdpBackgroundTask.cs
+++ b/Samples/EnterpriseDataProtection/cs/Tasks/EdpBackgroundTask.cs
@@ -120,21 +120,28 @@ private async void DoFileWork(IBackgroundTaskInstance taskInstance)
StorageFile logFile = await localFolder.CreateFileAsync(logFileName, CreationCollisionOption.OpenIfExists);
- // Create a protected file
- ProtectedFileCreateResult result = await FileProtectionManager.CreateProtectedAndOpenAsync(localFolder,
- fileName, m_EnterpriseID, CreationCollisionOption.ReplaceExisting);
-
- m_fileProtStatus = result.ProtectionInfo.Status.ToString();
+ // Create a protected file allows the creation of new files even after keys are dropped so that application
+ // can create and continue writing to files under lock
+
+ var result = await FileProtectionManager.CreateProtectedAndOpenAsync(localFolder,
+ fileName,
+ m_EnterpriseID,
+ CreationCollisionOption.ReplaceExisting
+ );
+ using (var stream = result.Stream)
+ {
+ m_fileProtStatus = result.ProtectionInfo.Status.ToString();
- // Write to File
+ // Write to File
- using (IOutputStream outputStream = result.Stream.GetOutputStreamAt(0))
- {
- DataWriter writer = new DataWriter(outputStream);
- for (int i = 0; i < 100; i++)
+ using (IOutputStream outputStream = result.Stream.GetOutputStreamAt(0))
{
- writer.WriteString(textBody);
- await writer.StoreAsync();
+ DataWriter writer = new DataWriter(outputStream);
+ for (int i = 0; i < 100; i++)
+ {
+ writer.WriteString(textBody);
+ await writer.StoreAsync();
+ }
}
}
diff --git a/Samples/FilePickerContracts/cs/FileOpenPickerPage.xaml b/Samples/FilePickerContracts/cs/FileOpenPickerPage.xaml
index 1fdab39a2c..794f12dfae 100644
--- a/Samples/FilePickerContracts/cs/FileOpenPickerPage.xaml
+++ b/Samples/FilePickerContracts/cs/FileOpenPickerPage.xaml
@@ -18,7 +18,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
- x:Name="RootPage">
+ SizeChanged="FileOpenPickerPage_SizeChanged">