From 2b585583c3ac0415b0831ba42300824ecc5f47d0 Mon Sep 17 00:00:00 2001 From: Raymond Chen Date: Wed, 28 Oct 2015 17:52:37 -0700 Subject: [PATCH] Windows 10 RTM Release - October 2015 Update 4 --- README.md | 19 +- Samples/ContactCardIntegration/README.md | 58 +++ .../cs/ContactCardIntegration.csproj | 180 ++++++++ .../cs/ContactCardIntegration.sln | 40 ++ .../cs/Package.appxmanifest | 75 ++++ .../cs/SampleConfiguration.cs | 71 +++ .../cs/Scenario1_CreateContacts.xaml | 53 +++ .../cs/Scenario1_CreateContacts.xaml.cs | 196 +++++++++ .../cs/Scenario2_ReceiveContact.xaml | 36 ++ .../cs/Scenario2_ReceiveContact.xaml.cs | 47 ++ .../ContactCardIntegration/cs/project.json | 16 + .../cs/Tasks/EdpBackgroundTask.cs | 31 +- .../cs/FileOpenPickerPage.xaml | 3 +- .../cs/FileOpenPickerPage.xaml.cs | 32 +- .../cpp/Package.appxmanifest | 4 +- .../cpp/Scenario2_MSA.xaml.h | 2 +- .../cpp/Scenario4_ManyProviders.xaml.h | 2 +- ...Scenario5_ManyProvidersManyAccounts.xaml.h | 2 +- .../cpp/Scenario6_CustomProvider.xaml.h | 2 +- .../cpp/WebAccountManagement.vcxproj | 3 - .../cs/DefaultAccountScenario.xaml.cs | 2 +- .../cs/MultipleAccountsScenario.xaml.cs | 2 +- .../cs/SingleAccountScenario.xaml.cs | 2 +- .../cs/SingleMicrosoftAccountScenario.xaml.cs | 2 +- Samples/XamlDataVirtualization/README.md | 62 +++ .../cs/DataVirtualization.csproj | 182 ++++++++ .../cs/DataVirtualization.sln | 49 +++ .../XamlDataVirtualization/cs/MainPage.xaml | 101 +++++ .../cs/MainPage.xaml.cs | 136 ++++++ .../cs/Package.appxmanifest | 55 +++ .../cs/SampleConfiguration.cs | 35 ++ .../cs/Scenario1/FileDataSource.cs | 269 ++++++++++++ .../cs/Scenario1/FileItem.cs | 66 +++ .../cs/Scenario1/ItemCacheManager.cs | 413 ++++++++++++++++++ .../cs/Scenario1/ItemIndexRangeExtensions.cs | 96 ++++ .../cs/Scenario1/ItemIndexRangeList.cs | 238 ++++++++++ .../cs/Scenario1/Scenario1.xaml | 64 +++ .../cs/Scenario1/Scenario1.xaml.cs | 66 +++ .../cs/Scenario2/FileDataSource2.cs | 405 +++++++++++++++++ .../cs/Scenario2/Scenario2.xaml | 65 +++ .../cs/Scenario2/Scenario2.xaml.cs | 65 +++ .../XamlDataVirtualization/cs/project.json | 16 + 42 files changed, 3199 insertions(+), 64 deletions(-) create mode 100644 Samples/ContactCardIntegration/README.md create mode 100644 Samples/ContactCardIntegration/cs/ContactCardIntegration.csproj create mode 100644 Samples/ContactCardIntegration/cs/ContactCardIntegration.sln create mode 100644 Samples/ContactCardIntegration/cs/Package.appxmanifest create mode 100644 Samples/ContactCardIntegration/cs/SampleConfiguration.cs create mode 100644 Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml create mode 100644 Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml.cs create mode 100644 Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml create mode 100644 Samples/ContactCardIntegration/cs/Scenario2_ReceiveContact.xaml.cs create mode 100644 Samples/ContactCardIntegration/cs/project.json create mode 100644 Samples/XamlDataVirtualization/README.md create mode 100644 Samples/XamlDataVirtualization/cs/DataVirtualization.csproj create mode 100644 Samples/XamlDataVirtualization/cs/DataVirtualization.sln create mode 100644 Samples/XamlDataVirtualization/cs/MainPage.xaml create mode 100644 Samples/XamlDataVirtualization/cs/MainPage.xaml.cs create mode 100644 Samples/XamlDataVirtualization/cs/Package.appxmanifest create mode 100644 Samples/XamlDataVirtualization/cs/SampleConfiguration.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/FileDataSource.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/FileItem.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/ItemCacheManager.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/ItemIndexRangeExtensions.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/ItemIndexRangeList.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/Scenario1.xaml create mode 100644 Samples/XamlDataVirtualization/cs/Scenario1/Scenario1.xaml.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario2/FileDataSource2.cs create mode 100644 Samples/XamlDataVirtualization/cs/Scenario2/Scenario2.xaml create mode 100644 Samples/XamlDataVirtualization/cs/Scenario2/Scenario2.xaml.cs create mode 100644 Samples/XamlDataVirtualization/cs/project.json diff --git a/README.md b/README.md index fb4c213c..25803a35 100644 --- a/README.md +++ b/README.md @@ -146,46 +146,49 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github. Context menu Context menu (XAML) - Disabling selection + Data virtualization + Disabling selection Display orientation Downloadable fonts (DirectWrite) - Downloadable fonts (XAML) + Downloadable fonts (XAML) Drag and drop Focus visuals - Full screen mode + Full screen mode Line spacing (DirectWrite) ListView and GridView - Lock screen apps + Lock screen apps Message dialog Multiple views - OCR + OCR Printing Pull-to-refresh - Responsiveness techniques + Responsiveness techniques Scaling according to DPI Splash screen - State triggers + State triggers Tailored multiple views Title bar - UI basics (XAML) + UI basics (XAML) User interaction mode WebView control (HTML) + + Window resizing diff --git a/Samples/ContactCardIntegration/README.md b/Samples/ContactCardIntegration/README.md new file mode 100644 index 00000000..3a5c2015 --- /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 00000000..359afa2f --- /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 00000000..f4d5c9b1 --- /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 00000000..c7483738 --- /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 00000000..1946c41d --- /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 00000000..b0df4620 --- /dev/null +++ b/Samples/ContactCardIntegration/cs/Scenario1_CreateContacts.xaml @@ -0,0 +1,53 @@ + + + + + + + + + Create test contacts with annotations + + +