SlideShare a Scribd company logo
Hello Windows 10
@gillcleeren
@nicovermeir
http://windows.Microsoft.com
About Gill
Gill Cleeren
Microsoft Windows Platform MVP & Regional Director
Ordina architect – Practice Manager
Pluralsight author
Speaker
Book author
@gillcleeren
gill@snowball.be
www.snowball.be
http://windows.Microsoft.com
About Nico
Nico Vermeir
Microsoft Windows Platform MVP
RealDolmen software engineer .NET / Mobile
Speaker
Book author
@NicoVermeir
nico_vermeir@hotmail.com
http://www.spikie.be
http://windows.Microsoft.com
Agenda
• The Story of 10
• XAML: then and now
• Data binding improvements
• Adaptive, adaptive and more adaptive
• New in Live Tiles
• The App Lifecycle
• (Optional) App-to-App communication
• (Optional) App Services
Introducing
the UWP
http://windows.Microsoft.com
Windows Core
The refactored common core
One hardware platform
Universal hardware driver
Standard network and I/O
Phone
Device
Xbox
Device
Desktop
Device
Windows Core
Desktop
SKU
Phone
SKU
Xbox
SKU
http://windows.Microsoft.com
One Windows
Desktop
SKU
PC
2 in 1
Mobile
SKU
Tablet
Phablet
Phone
Xbox
SKU
Xbox
IoT
SKU
Band
IoT headless
SKU
Raspberry Pi
Home
Automation
Surface Hub
SKU
Surface Hub
Holographic
SKU
HoloLens
Each family adds features
to the one it inherits
http://windows.Microsoft.com
Easy for users to get
& stay current
Unified core
and app platform
The convergence journey
Windows 10
Converged
OS kernel
Converged
app model
http://windows.Microsoft.com
Phone Small Tablet
2-in-1s
(Tablet or Laptop)
Desktops
& All-in-OnesPhablet Large Tablet
Classic
Laptop
Xbox IoTSurface Hub Holographic
Windows 10
http://windows.Microsoft.com
One Store +
One Dev Center
Reuse
Existing Code
One SDK +
Tooling
Adaptive
User Interface
Natural
User Inputs
One Universal Windows Platform
http://windows.Microsoft.com
Universal Windows Platform
A single API surface
A guaranteed API surface
The same on all devices
Phone
Device
Xbox
Device
Desktop
Device
Windows Core
Universal Windows Platform
http://windows.Microsoft.com
Windows app
A single binary
Running on any device
Testing for capabilities
Adjusting to devices
Phone
Device
Xbox
Device
Desktop
Device
Windows Core
Universal Windows Platform
Windows App
http://windows.Microsoft.com
The developer story
When writing for iOS,
A developer writes for iPad & iPhone
When writing for Android,
A developer writes for all supported devices
When writing for Windows 8,
A developer writes for each devices
When writing for Windows 10,
A developer writes for every device
DEMO
Hello World
http://windows.Microsoft.com
Platform extensions
Device-specific API
Family-specific capabilities
Compatible across devices
Unique update cadence
Phone
Device
Xbox
Device
Desktop
Device
Windows Core
Universal Windows Platform
Windows App
Phone
extension
Xbox
extension
Desktop
extension
Extensions don't invalidate
binaries on other devices
http://windows.Microsoft.com
UAP
Windows Core Windows Core Windows Core Windows Core
UAP UAP UAP
Desktop Mobile Xbox More…
http://windows.Microsoft.com
Test capabilities at runtime
Use Adaptive Code to light-up
your app on specific devices
var api = "Windows.Phone.UI.Input.HardwareButtons";
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(api))
{
Windows.Phone.UI.Input.HardwareButtons.CameraPressed
+= CameraButtonPressed;
}
http://windows.Microsoft.com
Windows 10
operating system
Bridging technologies
Win32
desktop
Web
hosted
Java
Android
Obj.C
iOS
Universal Windows Platform
WWAC++
& CX
.Net
languages
HTML
DirectX
XAML
C++
.Net
languages
MFCWFWPF
.Net
runtime
XAML: then and now
http://windows.Microsoft.com
Windows 8/10 Layout controls
<Border Thickness="" Brush="" />
<Canvas />
<Grid />
<RelativePanel />
<ScrollViewer />
<SplitView DisplayMode="" />
<StackPanel Orientation="" />
<VariableSizedWrapGrid />
<ViewBox Stretch="" />
http://windows.Microsoft.com
RelativePanel
Defines an area within which you can position and align child objects in relation to
each other or the parent panel.
RelativePanel is a constraint based layout container that you can use to create UIs
by expressing spatial relationships between elements.
Using RelativePanel’s attached properties, you can position a UI element relative to
another UI element (A is RelativePanel.Below B) as well as relative to the panel (A is
RelativePanel.AlignTopWithPanel).
-MSDN
http://windows.Microsoft.com
RelativePanel
Some child elements
act as anchors
Most child elements
relate to others
It's a layout technique
friendly with States
See Adaptive Triggers later!
http://windows.Microsoft.com
Important properties
Attached properties
• Above & Below
• AlignBottomWith & AlignTopWith
• AlignBottomWithPanel & AlignTopWithPanel
• AlignHorizontalCenterWith & AlignVerticalCenterWith
• AlignHorizontalCenterWithPanel & AlignVerticalCenterWithPanel
• AlignLeftWith & AlignRightWith
• AlignLeftWithPanel & AlignRightWithPanel
• LeftOf & RightOf
http://windows.Microsoft.com
Some RelativePanel samples
<RelativePanel>
<Border Width="100" Height="100" Background="Blue"
RelativePanel.AlignHorizontalCenterWithPanel="True"
RelativePanel.AlignVerticalCenterWithPanel="True"/>
</RelativePanel>
http://windows.Microsoft.com
Some RelativePanel samples
<RelativePanel>
<Border x:Name="ElementOne" Width="200" Height="200" Background="Red"
RelativePanel.AlignHorizontalCenterWithPanel="True"
RelativePanel.AlignVerticalCenterWithPanel="True"/>
<Border x:Name="ElementTwo" Width="100" Height="100" Background="Blue"
RelativePanel.Above="ElementOne"/>
</RelativePanel>
http://windows.Microsoft.com
Some RelativePanel samples
<RelativePanel>
<Border x:Name="ElementOne" Width="200" Height="200" Background="Red"
RelativePanel.AlignHorizontalCenterWithPanel="True"
RelativePanel.AlignVerticalCenterWithPanel="True"/>
<Border x:Name="ElementTwo" Width="100" Height="100" Background="Blue"
RelativePanel.AlignBottomWith="ElementOne"/>
</RelativePanel>
http://windows.Microsoft.com
Some RelativePanel samples
<RelativePanel BorderBrush="Gray" BorderThickness="10">
<Rectangle x:Name="RedRect" Fill="Red" MinHeight="100" MinWidth="100"/>
<Rectangle x:Name="BlueRect" Fill="Blue" MinHeight="100" MinWidth="100"
RelativePanel.RightOf="RedRect" />
<Rectangle x:Name="GreenRect" Fill="Green" MinHeight="100" Margin="0,5,0,0“
RelativePanel.Below="RedRect" RelativePanel.AlignLeftWith="RedRect"
RelativePanel.AlignRightWith="BlueRect"/>
<Rectangle Fill="Yellow" MinHeight="100"
RelativePanel.Below="GreenRect" RelativePanel.AlignLeftWith="BlueRect"
RelativePanel.AlignRightWithPanel="True"/>
</RelativePanel>
DEMO
RelativePanel
http://windows.Microsoft.com
We wanted this for a long time
http://windows.Microsoft.com
We wanted this for a long time
http://windows.Microsoft.com
Now available: the SplitView!
<SplitView x:Name="SplitView" Background="Black" OpenPaneLength="240" CompactPaneLength="48"
DisplayMode="CompactOverlay" IsPaneOpen="False"
Content="{Binding}">
<SplitView.Pane>
<StackPanel x:Name="SplitViewPanePanel">
<RadioButton x:Name="BackRadioButton" Click="BackRadioButton_Click"
Style="{StaticResource NavRadioButtonStyle}" Content="Back" GroupName="Back"/>
<RadioButton x:Name="HamburgerRadioButton" Click="HamburgerRadioButton_Click"
Style="{StaticResource NavRadioButtonStyle}" Content="Menu" GroupName="Hamburger"/>
</StackPanel>
</SplitView.Pane>
</SplitView>
http://windows.Microsoft.com
SplitView
IsPaneOpen="True" IsPaneOpen="False"
DisplayMode=
"Inline"
DisplayMode=
"Overlay"
DisplayMode=
"CompactInline"
DisplayMode=
"CompactOverlay"
http://windows.Microsoft.com
Sample SplitView
<SplitView x:Name="MySplitView" DisplayMode="CompactOverlay" IsPaneOpen="False"
CompactPaneLength="50" OpenPaneLength="150">
<SplitView.Pane>
<StackPanel Background="Gray">
<Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content="&#xE700;"
Width="50" Height="50" Background="Transparent" Click="HamburgerButton_Click"/>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton1" FontFamily="Segoe MDL2 Assets" Content="&#xE825;"
Width="50" Height="50" Background="Transparent"/>
<TextBlock Text="Button 1" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
…
</StackPanel>
</SplitView.Pane>
<SplitView.Content>
<Grid>
<TextBlock Text="SplitView Basic" FontSize="54" Foreground="White"/>
</Grid>
</SplitView.Content>
</SplitView>
http://windows.Microsoft.com
The resulting SplitView
DEMO
SplitView
http://windows.Microsoft.com
Buttons
<Button Content="" />
<HyperlinkButton />
<RepeatButton />
<ToggleButton IsChecked="" />
http://windows.Microsoft.com
Text controls
<TextBox Text="" />
<PasswordBox Text="" />
<TextBlock Text="" />
<AutoSuggestBox />
<RichEditBox Content="" />
<RichTextBlock Content="" />
<BitmapIcon UriSource="" />
<FontIcon Glyph="" />
<SymbolIcon Icon="" />
<PathIcon Data="" />
http://windows.Microsoft.com
AutoSuggestBox
DEMO
Text controls
http://windows.Microsoft.com
Selection and picker controls
<CalendarView />
<DatePicker Date="" />
<TimePicker Time="" />
<ToggleSwitch IsChecked="" />
<CheckBox IsCHecked="" />
<RadioButton IsChecked="" />
<ComboBox />
<ListBox />
<Slider Minimum="" Maximum="" />
http://windows.Microsoft.com
CalendarView
Windows uses this one itself!
DEMO
Selection & pickers
http://windows.Microsoft.com
Collection/data controls
<ItemsControl ItemsSource="" />
<FlipView />
<GridView />
<ListView />
<SematicZoom />
<Pivot />
<Hub Orientation="" />
<ContentControl ControlTemplate="" />
http://windows.Microsoft.com
Pivot
http://windows.Microsoft.com
App bars and commands
<AppBar />
<CommandBar />
<AppBarButton Label="" Icon="" />
<AppBarToggleButton IsChecked="" />
<AppBarSeparator />
http://windows.Microsoft.com
Flyout controls
<Popup IsOpen="" />
<ContentDialog Title="" Content="" />
<Flyout Placement="" />
<MenuFlyout />
<ToolTip />
http://windows.Microsoft.com
ContentDialog
DEMO
Flyout controls &
ContentDialog
http://windows.Microsoft.com
Progress, Media & Inking controls
<ProgressBar IsIntermediate="" />
<ProgressRing IsActive="" />
<Image />
<InkCanvas />
<MediaElement />
http://windows.Microsoft.com
InkCanvas
Extremely complex control to start using!
<Grid>
<!-- It’s this simple -->
<InkCanvas/>
</Grid>
DEMO
Inking
http://windows.Microsoft.com
Maps
DEMO
Map control
http://windows.Microsoft.com
Live Visual Tree
DEMO
Live Visual Tree
Data binding
What problem
are we solving?
http://windows.Microsoft.com
http://windows.Microsoft.com
x:Bind
Compiled binding
Bindings are committed at compile-time
Strongly-typed binding
Duck binding is not supported
Default mode is OneTime
OneWay and TwoWay are still available
Standard binding approaches
INotifyPropertyChanged, IObservableVector, INotifyCollectionChanged
The data context of x:Bind
is the code-behind class
http://windows.Microsoft.com
Syntax
<TextBox Text="{Binding
Converter
ConverterLanguage
ConverterParameter
ElementName
FallbackValue
Mode
Path
RelativeSource
Source
TargetNullValue
UpdateSourceTrigger}
<TextBox Text="{x:Bind
Converter
ConverterLanguage
ConverterParameter
ElementName
FallbackValue
Mode
Path
RelativeSource
Source
TargetNullValue
UpdateSourceTrigger}
DEMO
Using the
Compiled binding
http://windows.Microsoft.com
<ListView ItemsSource="{x:Bind ViewModel.Employees}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="model:Employee">
<Grid>
<TextBlock Text="{x:Bind Name}"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Data Templates
http://windows.Microsoft.com
Syntax differences
<ListView ItemsSource="{Binding Items}" Header="Classic" Grid.Column="0">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView ItemsSource="{x:Bind ViewModel.Items}" xmlns:m="using:Blank3.Models"
Header="Compiled" Grid.Column="1">
<ListView.ItemTemplate>
<DataTemplate x:DataType="m:TodoItem">
<TextBlock Text="{x:Bind Title}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
http://windows.Microsoft.com
Resource dictionaries
<ResourceDictionary
x:Class="MyNamespace.MyTemplates"
xmlns:model="using:xBindSampleModel">
<DataTemplate
x:Key="MyTemplate"
x:DataType="model:Employee">
<TextBlock Text="{x:Bind Name}" />
</DataTemplate>
</ResourceDictionary>
namespace MyNamespace
{
public class MyTemplates
{
public MyTemplates()
{
InitializeComponent();
}
}
}
http://windows.Microsoft.com
Referencing a dictionary
</UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<local:MyTemplates/>
<ResourceDictionary Source="filename" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
http://windows.Microsoft.com
Binding for Events
<Button Click="PokeEmployee">Poke Employee</Button>
<Button Click="{x:Bind Employee.Poke}">Poke Employee</Button>
Signature
Have no parameters - void Poke()
Match event parameters - void Poke(object sender, RoutedEventArgs e)
Match event base types - void Poke(object sender, object e)
Overloading is not supported
Because all events are eligible:
This may replace ICommand & EventToCommand
Note: this does not include parameter or CanExecute
http://windows.Microsoft.com
Page.ViewModel
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
this.DataContextChanged += (s, e) =>
{
ViewModel = DataContext as ViewModels.MainPageViewModel;
};
}
// strongly-typed view models enable x:bind
public ViewModels.MainPageViewModel ViewModel { get; set; }
}
DEMO
Using a ViewModel
declaratively
http://windows.Microsoft.com
When to use classic binding
Duck Typing
Text=“{Binding Age}” works for both PersonModel & WineModel
Dictionary graphs
Use {Binding} with JSON or other untyped objects
Code-behind binding: adding and removing
bindings on the fly
Can add/remove {x:Bind} @ runtime
Use in a style
{x:Bind} can’t be used in a style for setters
{x:Bind} can be used in a DataTemplate that is defined in the style
{x:Bind} is not for
every situation right now.
It will in the future.
x:Bind can meet your binding
needs most of the time.
Let’s say around 80%
The adaptive story
http://windows.Microsoft.com
http://windows.Microsoft.com
http://windows.Microsoft.com
http://windows.Microsoft.com
Tailored design
Build pages/code for individual families
Use MRT in App.xaml.cs to determine the family
One-handed interface?
Typically phone or small tablets
Test diagonal screen size (<7")
if (physical_diagonal_size <= 7)
// optimized for one-handed operation
rootFrame.Navigate(typeof(MainPage_OneHanded), e.Arguments);
else
rootFrame.Navigate(typeof(MainPage), e.Arguments);
Nothing is stopping you from
creating a multi-headed solution
http://windows.Microsoft.com
Dedicated, targeted apps
Adaptive tooling
http://windows.Microsoft.com
Visual States
Define XAML views
Unique layout for distinct states
Simplify animation
Automatically implement state transitions
Build in Blend
Design and preview states and transitions
DEMO
Visual states /
Adaptive triggers /
Custom triggers
How Windows
makes design easier
http://windows.Microsoft.com
Adaptive controls
http://windows.Microsoft.com
Input intelligence
Techniques to adapt
http://windows.Microsoft.com
Three core adaptive approaches
Responsive design
Resize your content
Reflow your content
Adaptive design
Reposition your content
Redesign your content
Tailored design
http://windows.Microsoft.com
Resize
http://windows.Microsoft.com
Reflow
http://windows.Microsoft.com
Reposition
http://windows.Microsoft.com
Redesign
Don't assume you will use
only one technique.
Adaptive Code and API versions
http://windows.Microsoft.com
Using Specific Versions of an API
Adaptive code techniques are not only for handling
device family-specific code
You write your app against a base UWP version, but 6
months later, UWP v.Next ships to users machines
Applies to Extension SDKs and Packages as well – new versions may offer new functionality
You want to keep supporting customers who haven’t
updated yet, but take advantage of up-level APIs for those
who have
http://windows.Microsoft.com
Package Dependency
<Dependencies>
<PackageDependency
Name="Microsoft.WinJS 1.0"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation,
L=Redmond, S=Washington, C=US"
minVersion ="1.5.0.0" />
</Dependencies>
http://windows.Microsoft.com
Gate use of up-level APIs
var contract = "Devices.Scanners.ScannerDeviceContract";
int majorVersionRequired = 3;
if (Windows.Foundation.Metadata.ApiInformation.
IsApiContractPresent(contract, majorVersionRequired ))
{
// Call the API that is present in V3 and above
...
}
else
{
// Your original code supporting users who haven’t upgraded yet
...
}
What about Shared Projects?
http://windows.Microsoft.com
What about shared projects?
Shared Projects share code
at the code level, pre-
compilation
Share with Windows 8.1 projects, Xamarin projects,
anything…
Still completely supported
#if Compilation directives used to conditionally include
code by those projects referencing the Shared Project
1. WINDOWS_APP
2. WINDOWS_PHONE_APP
3. WINDOWS_UAP (new)
http://windows.Microsoft.com
Use Adaptive Code in Shared too!
#if WINDOWS_PHONE_APP
// Processing for Windows Phone 8.1 only
Windows.Phone.UI.Input.HardwareButtons.CameraPressed
+= this.Camera_Pressed;
#elif WINDOWS_UAP
// Processing for Windows UWP – Desktop AND Mobile
if (Windows.Foundation.Metadata.ApiInformation
.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons";))
{
// But this is only for UWP AND Mobile
Windows.Phone.UI.Input.HardwareButtons.CameraPressed
+= this.Camera_Pressed;
}
#endif
Tile basics
http://windows.Microsoft.com
Basic State
Plate
App Logo
Short Name
Plate
App Logo
Short Name
Semi-Live State
Plate
App Logo
Short Name
Badge
Plate
App Logo
Short Name
Badge
Live State
Plate
App Icon
Short Name
Badge
Content
Plate
Short Name
Badge
App Icon
Content
Tile anatomy
http://windows.Microsoft.com
Updating tiles
Scheduled
Set template and time with “ScheduledTileNotification”
Periodic
Pull from URL 30m / 60m / 6h / 12h / 24h
Local
Update from (foreground/background) app
Push
Use push services
Update badge
http://windows.Microsoft.com
Update tile badge
// build badge
var type = BadgeTemplateType.BadgeNumber;
var xml = BadgeUpdateManager.GetTemplateContent(type);
// update element
var elements = xml.GetElementsByTagName("badge");
var element = elements[0] as Windows.Data.Xml.Dom.XmlElement;
element.SetAttribute("value", "47");
// send to lock screen
var updator = BadgeUpdateManager.CreateBadgeUpdaterForApplication();
var notification = new BadgeNotification(xml);
updator.Update(notification);
http://windows.Microsoft.com
Responsive tiles
Tiles are not
always the same size
Tiles adapt to
the screen they are on
Since the Start grid has different densities
and adapts to the screen size of your device,
so do our tiles and the content within them.
High density exampleLow density example
Tile templates
http://windows.Microsoft.com
http://windows.Microsoft.com
Legacy templates
If a template meets your
needs, go ahead and use it.
Previous templates remain
Phone and Windows templates have been merged
There are over 80 templates available
http://windows.Microsoft.com
Create a secondary tile
var tileId = "DetailsTile";
var pinned = SecondaryTile.Exists(tileId);
if (!pinned)
{
var tile = new SecondaryTile(tileId)
{
DisplayName = "Record details",
Arguments = "123"
};
// extra details
var success = await tile.RequestCreateAsync();
}
Use secondary tiles
to deep-link into your app
Adaptive templates
http://windows.Microsoft.com
Adaptive tiles
<tile>
<visual>
<binding template="TileMedium">
<group> <subgroup>
<text hint-style="subtitle">John Doe</text>
<text hint-style="subtle">Photos from our trip</text>
<text hint-style="subtle">Thought you might…</text>
</subgroup>
</group>
<group> <subgroup>
…
</subgroup>
</group>
</binding>
</visual>
</tile> Min. Med Size Max Med. Size
http://windows.Microsoft.com
Adaptive tiles
<tile>
<visual>
<binding template="TileMedium">
<image source="Assetsimage.png" placement="background" />
<text hint-wrap="true">
Microsoft HoloLens: A
Sensational Vision of the PC’s Future
</text>
</binding>
</visual>
</tile>
Min. Med Size Max Med. Size
Adaptive samples
http://windows.Microsoft.com
Sample: Small Tile
<binding template="TileSmall"
branding="none" hint-textStacking="center">
</binding>
http://windows.Microsoft.com
Sample 1: Medium Tile
<binding template="TileMedium"
branding="Name" displayName="Hipstame">
<text hint-style="caption">
9:50 AM, Wednesday</text>
<text hint-style="captionsubtle" hint-wrap="true">
263 Grove St, San Francisco, CA 94102</text>
</binding>
http://windows.Microsoft.com
Sample: Wide Tile
<binding template="TileWide" displayName="Hipstame">
<group>
<subgroup hint-weight="33">
<image placement="inline" src="http://image.jpg" />
</subgroup>
<subgroup>
<text hint-style="caption">
9:50 AM, Wednesday</text>
<text hint-style="captionsubtle"
hint-wrap="true" hint-maxLines="3">
263 Grove St, San Francisco, CA 94102</text>
</subgroup>
</group>
</binding>
http://windows.Microsoft.com
Sample: Large Tile
<binding template="TileLarge" displayName="Hipstame">
<group>
<subgroup hint-weight="33">
<image placement="inline" src="http://image.jpg" />
</subgroup>
<subgroup>
<text hint-style="caption">
9:50 AM, Wednesday</text>
<text hint-style="captionsubtle"
hint-wrap="true" hint-maxLines="3">
263 Grove St, San Francisco, CA 94102</text>
</subgroup>
</group>
<image placement="inline" src="http://map.jpg"/>
</binding>
http://windows.Microsoft.com
Adaptive
Templates
Application lifecycle
http://windows.Microsoft.com
App Lifecycle we’ve had already with
Windows 8.1
The result:
Predictable behavior
on every Windows device
http://windows.Microsoft.com
Application Lifetime
Running Suspended Running Suspended Not Running
Launched Suspended
(5 seconds)
Activated Suspended
(5 seconds)
Memory
Terminated
(no event)
Important note:
Desktop device-family apps suspend
when they are minimized
http://windows.Microsoft.com
Handling suspension
public App()
{
this.InitializeComponent();
this.Suspending += (s, e) =>
{
// Save data
};
this.Resuming += (s, e) =>
{
// Load data
};
}
http://windows.Microsoft.com
Navigation state
Frame.GetNavigationState()
Frame.SetNavigationState()
Recommended to use strings as parameters
http://windows.Microsoft.com
OnNavigatedFrom
public override Task OnNavigatedFromAsync(IDictionary<string, object> state, bool suspending)
{
if (suspending)
{
state["FirstName"] = this.FirstName;
state["LastName"] = this.LastName;
state["Email"] = this.Email;
}
return Task.FromResult<object>(null);
}
http://windows.Microsoft.com
OnNavigatedTo
public override void OnNavigatedTo(string parameter, NavigationMode mode,
IDictionary<string, object> state)
{
try
{
this.FirstName = state["FirstName"]?.ToString();
this.LastName = state["LastName"]?.ToString();
this.Email = state["Email"]?.ToString();
}
finally { state.Clear(); }
}
DEMO
Handle suspend
Extended execution
http://windows.Microsoft.com
Extended execution
Requesting extended execution
There is no guarantee resources are available
Extended execution has no UI
Scenario “I have data this time”
Handle the Revoked event (1 second warning)
Scenario “I’m a special kind of app”
These apps run indefinitely
Special kinds of apps
1. Turn-by-turn (location tracking) app
2. Audio & VOIP application
There is a balance between load
speed & shutdown time
http://windows.Microsoft.com
Extended execution (type 1)Memory
Running Extend
Suspended
(5 seconds)
Request
Revoked
(1 second)
Suspended
No UI
(short)
Suspended
(No event)
http://windows.Microsoft.com
Requesting extension in suspend
private async void OnSuspending(object sender, SuspendingEventArgs args)
{
var deferral = args.SuspendingOperation.GetDeferral();
using (var session = new ExtendedExecutionSession{ Reason = ExtendedExecutionReason.SavingData })
{
session.Description = "Upload Data";
session.Revoked += (s, e) => { Log("Save incomplete"); };
try
{
if (await session.RequestExtensionAsync() == ExtendedExecutionResult.Denied)
// takes 3 seconds
UploadBasicData();
else
// takes 8 seconds
await UploadDataAsync(session);
Log("Save complete");
}
catch { Log("Save failed"); }
finally { deferral.Complete(); }
}
}
Extend the suspension
of a foreground app
http://windows.Microsoft.com
Extended execution (type 2)Memory
Running Extend
Navigate
away
Special Request
(during runtime)
Revoked
(1 second)
Suspended
No UI
(long running)
Suspended
(No event)
Automatic
extension
Prevent the termination
of a foreground app
http://windows.Microsoft.com
Requesting extension in app
private async void InvokeMyExtension()
{
if (this._session == null)
{
this._session = new ExtendedExecutionSession{ Reason = ExtendedExecutionReason.LocationTracking }
this._session.Description = “Driving directions";
if (await this._ session.RequestExtensionAsync() == ExtendedExecutionResult.Allowed)
{
// todo approved
}
else
{
// todo denied
}
}
}
http://windows.Microsoft.com
Enum VALUES
[ContractVersion(typeof(UniversalApiContract), 65536)]
public enum ExtendedExecutionReason
{
Unspecified = 0,
LocationTracking = 1,
SavingData = 2
}
[ContractVersion(typeof(UniversalApiContract), 65536)]
public enum ExtendedExecutionResult
{
Allowed = 0,
Denied = 1
}
The global pool
supports burst events
DEMO
Extended execution
App to App in Windows 8.1
http://windows.Microsoft.com
Launcher.LaunchUriAsync(new Uri("sampleapp:?ID=aea6"));
Launcher.LaunchFileAsync(file);
App to App in Windows 8.1
URI/Protocol Activation
User/OS chooses target
http://windows.Microsoft.com
App to App in Windows 8.1
Share Contract
DataTransferManager.ShowShareUI();
User chooses target
App to App in Windows 10 UWP
http://windows.Microsoft.com
Enhanced App to App in Windows 10
Send file token, send data
Launch a *specific* app
App Services
Launch for Results
http://windows.Microsoft.com
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);
http://windows.Microsoft.com
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);
http://windows.Microsoft.com
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);
http://windows.Microsoft.com
App Services
Client App A
Client App B Background Task
App with App Service
http://windows.Microsoft.com
URI Activation for Device Settings
Category Settings page Mobile and/or Desktop Uri
System
Display (on desktop)
Screen (on mobile)
Both ms-settings://screenrotation
Notifications Both ms-settings://notifications
Storage Sense Both ms-settings://storagesense
Battery Saver Both ms-settings://batterysaver
Maps Both ms-settings://maps
Devices Bluetooth Both ms-settings://bluetooth
Network and Wi-fi
Wi-Fi Both ms-settings://network/wifi
Airplane mode Both ms-settings://network/airplanemode
Cellular Both ms-settings://network/cellular
Data Sense Both ms-settings://datasense
NFC Mobile only ms-settings://proximity
Proxy Desktop only ms-settings://network/proxy
More… [See documentation for complete list]
DEMO
URI Activation in UWP
http://windows.Microsoft.com
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);
App1 App2
DEMO
Launch for Results
With App Services, store
applications can provide services to
other store applications
http://windows.Microsoft.com
What are App Services?
UWP offers many APIs that allow apps to interact with the
platform
• Windows.ApplicationModel.Contacts
• Windows.ApplicationModel.Email
• Windows.System.Launcher.LaunchUriAsync to launch settings, maps, store etc…
• more…
UWP also allows apps to interact with each other
• Uri Associations using LaunchUriAsync
• File associations using LaunchFileAsync
• Launch for results using LaunchUriForResultsAsync
• App Services
http://windows.Microsoft.com
Think ‘Web Services on device’
Client App A
Client App B
Background Task
App with App Service
http://windows.Microsoft.com
Scenario: Bar Code Scanning
Bar Code decoding
App Service
Image bytes in
ValueSet or FileToken
Decoded data
http://windows.Microsoft.com
Scenario: Enterprise suite of apps
App Service
Maintains Inventory cache
Client App A
Client App B
Interact with
cloud services
App Service
Proximity Reading Services
http://windows.Microsoft.com
AppServiceConnection connection = new AppServiceConnection();
connection.AppServiceName = "microsoftDX-appservicesdemo";
connection.PackageFamilyName = "24919ArunjeetSingh.InstapaperIt";
AppServiceConnectionStatus connectionStatus = await connection.OpenAsync();
if (connectionStatus == AppServiceConnectionStatus.Success)
{
//Send data to the service
var message = new ValueSet();
message.Add("Command", "CalcSum");
message.Add("Value1", Int32.Parse(Value1.Text));
message.Add("Value2", Int32.Parse(Value2.Text));
//Send message and wait for response
AppServiceResponse response = await connection.SendMessageAsync(message);
if (response.Status == AppServiceResponseStatus.Success)
{
int sum = (int)response.Message["Result"];
new MessageDialog("Result=" + sum).ShowAsync();
}
}
else
{
//Drive the user to store to install the app that provides the app service
}
App Services – Client
http://windows.Microsoft.com
namespace AppServicesDemoTask
{
public sealed class AppServiceTask : IBackgroundTask
{
private static BackgroundTaskDeferral _serviceDeferral;
public void Run(IBackgroundTaskInstance taskInstance)
{
// Associate a cancellation handler with the background task.
taskInstance.Canceled += TaskInstance_Canceled;
// Get the deferral object from the task instance
_serviceDeferral = taskInstance.GetDeferral();
var appService = taskInstance.TriggerDetails as AppServiceTriggerDetails;
if (appService.Name == "microsoftDX-appservicesdemo")
{
//Maybe ValidateCaller(appService.CallerPackageFamilyName) ??
appService.AppServiceConnection.RequestReceived += RequestReceived;
}
}
...
App Services – Service (1/2)
http://windows.Microsoft.com
private async void RequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args)
{
var message = args.Request.Message;
// This service uses a Command keyed entry for the client to invoke services from the App Service
string command = message["Command"] as string;
switch (command)
{
case "DoIt": {
var messageDeferral = args.GetDeferral();
int value1 = (int)message["Value1"];
... Do some processing
//Set a result to return to the caller
var returnMessage = new ValueSet();
returnMessage.Add("Result", result);
var responseStatus = await args.Request.SendResponseAsync(returnMessage);
messageDeferral.Complete();
break;
}
case "Quit": {
//Service was asked to quit. Complete service deferral so platform can terminate
_serviceDeferral.Complete();
break;
}
App Services – Service (2/2)
http://windows.Microsoft.com
Declaring App Service
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" ... >
<Applications>
<Application Id="App“
... >
<Extensions>
<uap:Extension Category="windows.appService“
EntryPoint="AppServicesDemoTask.AppServiceTask">
<uap:AppService Name="microsoftDX-appservicesdemo" />
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
http://windows.Microsoft.com
Two-way Communication
Client and server can keep a two-way chatty
communication channel open
Client can attach a RequestReceived event handler to its own
AppServiceConnection instance
Both client and server can send and receive messages
AppServiceConnectionStatus connectionStatus = await connection.OpenAsync();
if (connectionStatus == AppServiceConnectionStatus.Success)
{
connection.RequestReceived += OnRequestReceived;
}
DEMO
App Services
http://windows.Microsoft.com
Summary
Windows 10 allows for REAL universal apps
Knowledge of WinRT is still very relevant
Let’s enjoy Windows 10
…and some BBQ!

More Related Content

PDF
DDD, CQRS & ES lessons learned (Gitte Vermeiren)
PPTX
Building your first android app using xamarin (Gill Cleeren)
PPTX
Tfs Build vNext (Jelle Druyts)
PDF
Embracing HTTP in the era of API’s
PPTX
Service Fabric Overview (Yves Goeleven)
PPTX
Sherlock Homepage - A detective story about running large web services (VISUG...
PPTX
How many iot technologies do you need to turn on a lightbulb (Kurt Claeys)
PPTX
Asp.net core 1.0 (Peter Himschoot)
DDD, CQRS & ES lessons learned (Gitte Vermeiren)
Building your first android app using xamarin (Gill Cleeren)
Tfs Build vNext (Jelle Druyts)
Embracing HTTP in the era of API’s
Service Fabric Overview (Yves Goeleven)
Sherlock Homepage - A detective story about running large web services (VISUG...
How many iot technologies do you need to turn on a lightbulb (Kurt Claeys)
Asp.net core 1.0 (Peter Himschoot)

What's hot (20)

PDF
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
PDF
Олександр Краковецький - UWP
PPTX
ASP.NET Core deployment options
PDF
BizTalk Server Extensibility
PPTX
Serverless in Azure with Functions
PPTX
Debugging your Way through .NET with Visual Studio 2015
PDF
Build 2017 - Whats new for Xamarin Devs
PPTX
.NET Conf 2019 高雄場 - .NET Core 3.0
PPTX
Launch It With Docker
PDF
Best Practices for couchDB developers on Microsoft Azure
PPTX
Serverless in action
PPTX
Infrastructure as Code on Azure: Show your Bicep!
PDF
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
PPTX
Azure serverless architectures
PPTX
Drupal DevOps on Microsoft Azure Websites
PPTX
Forms + azure
PPTX
Azure Service Fabric: The road ahead for microservices
PDF
Experiences using CouchDB inside Microsoft's Azure team
PPTX
Azure and web sites hackaton deck
PPTX
Magic of web components
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Олександр Краковецький - UWP
ASP.NET Core deployment options
BizTalk Server Extensibility
Serverless in Azure with Functions
Debugging your Way through .NET with Visual Studio 2015
Build 2017 - Whats new for Xamarin Devs
.NET Conf 2019 高雄場 - .NET Core 3.0
Launch It With Docker
Best Practices for couchDB developers on Microsoft Azure
Serverless in action
Infrastructure as Code on Azure: Show your Bicep!
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
Azure serverless architectures
Drupal DevOps on Microsoft Azure Websites
Forms + azure
Azure Service Fabric: The road ahead for microservices
Experiences using CouchDB inside Microsoft's Azure team
Azure and web sites hackaton deck
Magic of web components
Ad

Similar to Hello windows 10: An overview of the new features for developers in WIndows 10 (20)

PDF
DotNet Cologne 2015 - Windows 10 AppDev, Teil3: Schönes für Entwickler - (Dan...
PPTX
Маргарита Остапчук "Що нового в Windows 10 для розробників"
PPTX
Developing windows 10 universal apps
PPTX
Universal App Platform - A preview of 3 new UI controls
PPTX
Deeper into Windows 10 Development
PDF
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
PPTX
Developing and Deploying Windows 10 Apps
PPTX
Intro to Windows Presentation for CSS NC-2.pptx
PPTX
Getting Started Developing Universal Windows Platform (UWP) Apps
PDF
20150812 4시간만에 따라해보는 windows 10 앱 개발
PPTX
Windows 10 pentru dezvoltatori - InfoEducație 2015
PPTX
Маргарита Остапчук (Microsoft Украина) «Разработка на универсальной платформе...
PPTX
Unique features of windows 8
PPTX
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
PDF
What Web Developers Need to Know to Develop Windows 8 Apps
PDF
14A81A05A1
PPTX
Windows 8 DevUnleashed - Session 1
PPTX
Windows Store apps development
PDF
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
PPTX
Introduction to Silverlight
DotNet Cologne 2015 - Windows 10 AppDev, Teil3: Schönes für Entwickler - (Dan...
Маргарита Остапчук "Що нового в Windows 10 для розробників"
Developing windows 10 universal apps
Universal App Platform - A preview of 3 new UI controls
Deeper into Windows 10 Development
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Developing and Deploying Windows 10 Apps
Intro to Windows Presentation for CSS NC-2.pptx
Getting Started Developing Universal Windows Platform (UWP) Apps
20150812 4시간만에 따라해보는 windows 10 앱 개발
Windows 10 pentru dezvoltatori - InfoEducație 2015
Маргарита Остапчук (Microsoft Украина) «Разработка на универсальной платформе...
Unique features of windows 8
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
What Web Developers Need to Know to Develop Windows 8 Apps
14A81A05A1
Windows 8 DevUnleashed - Session 1
Windows Store apps development
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Introduction to Silverlight
Ad

More from Visug (7)

PDF
Gdbc keynote-visug
PPTX
Making enabling apps for disabled people
PPTX
Sherlock Homepage (Maarten Balliauw)
PDF
DevOps with Visual studio Release Management (Pieter Gheysens)
PPTX
Exploring XLabs
PDF
So you write JavaScript? Keep the crap out of there then!
PPTX
Visug: Say Hello to my little friend: a session on Kinect
Gdbc keynote-visug
Making enabling apps for disabled people
Sherlock Homepage (Maarten Balliauw)
DevOps with Visual studio Release Management (Pieter Gheysens)
Exploring XLabs
So you write JavaScript? Keep the crap out of there then!
Visug: Say Hello to my little friend: a session on Kinect

Recently uploaded (20)

PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
System and Network Administraation Chapter 3
PDF
top salesforce developer skills in 2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Understanding Forklifts - TECH EHS Solution
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
L1 - Introduction to python Backend.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Reimagine Home Health with the Power of Agentic AI​
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
CHAPTER 2 - PM Management and IT Context
System and Network Administraation Chapter 3
top salesforce developer skills in 2025.pdf
Operating system designcfffgfgggggggvggggggggg
Digital Systems & Binary Numbers (comprehensive )
How to Choose the Right IT Partner for Your Business in Malaysia
Design an Analysis of Algorithms II-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Understanding Forklifts - TECH EHS Solution
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
2025 Textile ERP Trends: SAP, Odoo & Oracle
PTS Company Brochure 2025 (1).pdf.......
L1 - Introduction to python Backend.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
wealthsignaloriginal-com-DS-text-... (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development

Hello windows 10: An overview of the new features for developers in WIndows 10

Editor's Notes

  • #16: Demo 1 From scratch in Blend
  • #31: XamUiBasics
  • #38: XamUiBasics
  • #39: XamUiBasics
  • #42: XamUIBasics
  • #47: XamUiBasics
  • #53: XamUiBasics
  • #56: XamUiBasics
  • #58: MapControl
  • #60: LiveVisualTreeDemo
  • #67: ContosoCookbook
  • #74: ContosoCookbook
  • #103: If you want to keep support for windows 8.1 you can keep your shared project – and leverage the new compiler directive “WINDOWS_UAP” for Windows 10 specific functionality. If you want to leverage full UAP targeting Windows 10, instead of compiler directives leverage the new ApiInformation.
  • #133: Template 10
  • #145: Extended execution demo
  • #156: LaunchForResultsDemo
  • #158: LaunchForResultsShoppingDemo
  • #169: AppServices