develop for windows 10 (preview)
TRANSCRIPT
![Page 1: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/1.jpg)
Develop for Windows 10(PREVIEW)
Dan Ardelean – MahizTwitter: @danardelean Email: [email protected] MVP Window Platform Development
Xamarin Certified Mobile Developer
![Page 2: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/2.jpg)
![Page 3: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/3.jpg)
Agenda
Windows Core
New Controls
App-to-App Communications
Action Center
![Page 4: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/4.jpg)
First, Windows Core
One, Common source
One Windows kernel
One File I/O stack
One app model
More…
![Page 5: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/5.jpg)
Easy for users to get & stay current
Unified core and app platform
The convergence journey
Windows 10
ConvergedOS kernel
Convergedapp model
![Page 6: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/6.jpg)
UAP = Universal App Platform
A collection of contracts & versions
![Page 7: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/7.jpg)
Target a version of UAPnot the Operating System
![Page 8: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/8.jpg)
Platform Versioning
<TargetPlatform
Name="Microsoft.Universal"
minVersion="2.0.0.0"
maxVersionTested="3.5.0.0" />
![Page 9: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/9.jpg)
Safely deploy one binaryto every type of device
![Page 10: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/10.jpg)
Extension SDKs
UAP
Windows Core Windows Core Windows Core Windows Core
UAP UAP UAP
Desktop Mobile Xbox More…
![Page 11: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/11.jpg)
Testing for capabilities
IsApiContractPresentIsEnumNamedValuePresentIsEventPresentIsMethodPresentIsPropertyPresentIsReadOnlyPropertyPresentIsTypePresentIsWriteablePropertyPresent
Windows.Foundation.Metadata.ApiInformation
![Page 12: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/12.jpg)
Test capabilities at runtime
var ns = "Windows.Phone.UI.Input.HardwareButtons";
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(ns))
{
Windows.Phone.UI.Input.HardwareButtons
.BackPressed += Back_BackPressed;
}
![Page 13: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/13.jpg)
Platform extensions
<ItemGroup>
<!-- Reference to the .Net Framework and Windows SDK are automatic -->
<SDKReference Include="Windows Desktop,Version=10.0.9910.0"/>
<SDKReference Include="Windows Mobile, Version=10.0.0.1"/>
</ItemGroup>
![Page 14: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/14.jpg)
DEMO
Visual Studio
3:33
![Page 15: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/15.jpg)
New Controls
![Page 16: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/16.jpg)
Relative Panel
AdaptiveRelative to the panel
Relative to a sibling
Simplified XAMLSimplified Visual Tree
Simplified Visual State
![Page 17: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/17.jpg)
Month Calendar
Basic operationDate picker
Calendar view
Density bars
InvestmentOutlook calendar
System calendar
![Page 18: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/18.jpg)
SplitView
![Page 19: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/19.jpg)
SplitView.PaneDisplayModeSplitView.IsPaneOpen
"True"SplitView.IsPaneOpen
"False"
Inline
Overlay
Compact Inline
Compact Overlay
![Page 20: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/20.jpg)
Visual State setters & triggers
Setters set discrete propertiesMany properties do not need animation
Triggers declare when a state is applied No need to manually handle events in code-behind
<VisualState x:Name="wideState"><VisualState.Setters>
<Setter Target="myPanel.Orientation" Value="Horizontal" /></VisualState.Setters><VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="600"/></VisualState.StateTriggers>
</VisualState>
![Page 21: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/21.jpg)
App to App Communicationenhancements in Windows 10
![Page 22: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/22.jpg)
Enhanced App to App in Windows 10
Send file token, send data
Launch a *specific* app
App Services
Launch for Results
![Page 23: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/23.jpg)
URI Activation++
Invoke a specific app
var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "24919.InstapaperIt";
var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com");
await Launcher.LaunchUriAsync(launchUri, options);
![Page 24: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/24.jpg)
URI Activation++
Send Files
var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "24919.InstapaperIt";
var token = SharedStorageAccessManager.AddFile (gpxFile);
ValueSet inputData = new ValueSet();
inputData.Add("Token", token);
var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com");
await Launcher.LaunchUriAsync(launchUri, options, inputData);
![Page 25: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/25.jpg)
Query URI Support
Discover if app already installed to handle a Uri
var queryUri = new Uri("instapaper:");
await Launcher.QueryUriSupportAsync(queryUri, LaunchUriType.LaunchUri);
?
var queryUri = new Uri("instapaper:");
string packageFamilyName = "24919.InstapaperIt";
await Launcher.QueryUriSupportAsync(queryUri, LaunchUriType.LaunchUriForResults, packageFamilyName);
![Page 26: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/26.jpg)
Launch for Results
Launching the app
var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "24919.Instap";
var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com");
await Launcher.LaunchUriForResultsAsync(launchUri, options, data);
var resultData = new ValueSet();
resultData.Add("Result", value);
operation.ProtocolForResultsOperation.ReportCompleted(resultData);A
App1 App2
![Page 27: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/27.jpg)
App ServicesWeb Services on Device
Client App A
Client App B Background Task
App with App Service
![Page 28: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/28.jpg)
Action Centermanaging your notification space
![Page 29: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/29.jpg)
Action center & Quick actions
![Page 30: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/30.jpg)
Action Center – User Experience
20 Notifications per app
Persistent notifications for 7 days (or shorter)
Users can: - “chase” (tap) a notification (removes it from the action center)
- remove a group of notifications
- remove all notifications
First available on Phone in 8.1 - now on Windows 10 desktop as well!
![Page 31: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/31.jpg)
Action Center Management APIs
Manage app notifications
Developers can:• Remove one or many notifications
• Tag and group notifications
• Replace a notification with a new one
• Set an expiration on notifications
• Send “Ghost Toast” notifications (only show up in the notification center)
![Page 32: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/32.jpg)
Action Center change triggers
ToastNotificationHistoryChangedTrigger• Fires whenever a user dismisses a notification from Action Center
• Or when an app adds or removes or replaces a notification
Use to trigger a Background task in which you can maintain consistency of unactioned item counts in app state and on Tiles
![Page 33: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/33.jpg)
Action Center change trigger// Background task for a ToastNotificationHistoryChangedTriggerpublic sealed class ActionCenterChangedTask: IBackgroundTask{
public void Run(IBackgroundTaskInstance taskInstance){
var toasts = ToastNotificationManager.History.GetHistory();if (toasts != null){
var count = toasts.Count();if (count== 0){BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();
}else{
XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);XmlElement badgeElement = (XmlElement)badgeXml.SelectSingleNode("/badge");badgeElement.SetAttribute("value", count.ToString());BadgeNotification badge = new BadgeNotification(badgeXml);BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge);
}}
}}
![Page 34: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/34.jpg)
Where to start
InstallationWindows 10 preview
• http://insider.windows.com/
Visual Studio 2015 preview
• http://www.visualstudio.com
The Visual Studio installer includes the Windows 10 preview SDK
ExtrasMicrosoft Account
• Windows Developer License
Hyper-V (hardware dependent)
• Phone emulator
![Page 35: Develop for Windows 10 (Preview)](https://reader031.vdocuments.site/reader031/viewer/2022032022/55a6b41b1a28ab172c8b45bf/html5/thumbnails/35.jpg)
Question?