Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2015 dan ardelean develop for windows 10

739 views

Published on

2015 dan ardelean develop for windows 10

Published in: Technology
  • Be the first to comment

  • Be the first to like this

2015 dan ardelean develop for windows 10

  1. 1. Develop for Windows 10 (PREVIEW) Dan Ardelean – Mahiz Twitter: @danardelean Email: dan.ardelean@live.com Microsoft MVP Window Platform Development Xamarin Certified Mobile Developer
  2. 2. Agenda Windows Core New Controls App-to-App Communications Action Center
  3. 3. First, Windows Core One, Common source One Windows kernel One File I/O stack One app model More…
  4. 4. Easy for users to get & stay current Unified core and app platform The convergence journey Windows 10 Converged OS kernel Converged app model
  5. 5. UAP = Universal App Platform A collection of contracts & versions
  6. 6. Target a version of UAP not the Operating System
  7. 7. Platform Versioning <TargetPlatform Name="Microsoft.Universal" minVersion="2.0.0.0" maxVersionTested="3.5.0.0" />
  8. 8. Safely deploy one binary to every type of device
  9. 9. Extension SDKs UAP Windows Core Windows Core Windows Core Windows Core UAP UAP UAP Desktop Mobile Xbox More…
  10. 10. Testing for capabilities IsApiContractPresent IsEnumNamedValuePresent IsEventPresent IsMethodPresent IsPropertyPresent IsReadOnlyPropertyPresent IsTypePresent IsWriteablePropertyPresent Windows.Foundation.Metadata.ApiInformation
  11. 11. 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; }
  12. 12. 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>
  13. 13. DEMO Visual Studio 3:33
  14. 14. New Controls
  15. 15. Relative Panel Adaptive Relative to the panel Relative to a sibling Simplified XAML Simplified Visual Tree Simplified Visual State
  16. 16. Month Calendar Basic operation Date picker Calendar view Density bars Investment Outlook calendar System calendar
  17. 17. SplitView
  18. 18. SplitView.PaneDisplayMode SplitView.IsPaneOpen "True" SplitView.IsPaneOpen "False" Inline Overlay Compact Inline Compact Overlay
  19. 19. Visual State setters & triggers Setters set discrete properties Many 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>
  20. 20. App to App Communication enhancements in Windows 10
  21. 21. Enhanced App to App in Windows 10 Send file token, send data Launch a *specific* app App Services Launch for Results
  22. 22. 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);
  23. 23. 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);
  24. 24. 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);
  25. 25. 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
  26. 26. App Services Web Services on Device Client App A Client App B Background Task App with App Service
  27. 27. Action Center managing your notification space
  28. 28. Action center & Quick actions
  29. 29. 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!
  30. 30. 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)
  31. 31. 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
  32. 32. Action Center change trigger // Background task for a ToastNotificationHistoryChangedTrigger public 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); } } } }
  33. 33. Where to start Installation Windows 10 preview • http://insider.windows.com/ Visual Studio 2015 preview • http://www.visualstudio.com The Visual Studio installer includes the Windows 10 preview SDK Extras Microsoft Account • Windows Developer License Hyper-V (hardware dependent) • Phone emulator
  34. 34. Question?

×