Principal Lead Program Manager Harnessing the Full Power of Input in Universal Windows Apps Harnessing the Full Power of Input in Universal Windows Apps 3622 Input and UWP overview Understanding the input platform ID: 595084
Download Presentation The PPT/PDF document "Reed Townsend" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1Slide2
Reed TownsendPrincipal Lead Program ManagerHarnessing the Full Power of Input in Universal Windows Apps
Harnessing the Full Power of Input in Universal Windows Apps
3-622Slide3
Input and UWP overviewUnderstanding the input platformInput deep dive and code demos
Wrap up and additional resources
AgendaSlide4
The same Windows platform is available on all Windows devices
Immediately target hundreds of millions of
devices
Now you can code for all these endpoints in the same way!
UWP PromiseSlide5Slide6
The
same
input platform
is available on all Windows devices
Running on many different devices will expose your app to
different
types
of input
Our platform
makes it easy
to handle these various
inputs
Input Promise for UWP AppsSlide7
Demo – Teaching Old Phones New TricksSlide8
Demo – Bringing the Power of Xbox to the PCSlide9
Understanding the Input PlatformSlide10
High Level View of the Input Platform Stack
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide11
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanel
Our universal frameworks offer a
variety of controls
These controls
have
built-in support
for correctly handling input
If you stick to these controls, your app will
“just work”
on all
devices
Frameworks
and ControlsSlide12
Demo – Frameworks and ControlsSlide13
Both controls and frameworks offer additional control over input handlingLet’s look at two areas:
Customizing a control’s behavior: XAML ScrollViewerFramework events for input and gestures
Going Deeper with Controls and Frameworks
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide14
The
ScrollViewer
control provides a
pannable
content surface in your app
ScrollViewer
also provides customizations such as:
Zooming
Snapping
to certain points
Enabling/disabling scroll
inertia
And more
A
ScrollViewer
can be used directly, and controls like
ListView
,
FlipView
,
GridView
,
TextBox
, and
RichEditBox
are built on it too
ScrollViewer
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide15
Code Walkthrough – ScrollViewerSlide16
Framework elements (including controls) have built-in support for input events
This lets you easily add custom behavior such as:Pointer press feedback
Pointer hover feedback
Respond to standard gestures
Input Events on Elements
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide17
Code Walkthrough – Input Events on ElementsSlide18
Need more power and flexibility? Slide19
If the functionality provided by the framework controls isn’t enough for your app, there are lower level input APIs available
Pointer and GestureRecognizer
APIs
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide20
The Pointer APIs abstract touch, mouse, and pen input into a single
APIPointer offers basic information common to all pointer types, and also offers input-specific data if you need it
This lets you handle all of these
inputs
without having to write specialized logic for each
Pointer APIs
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide21
Code Walkthrough – Pointer APIsSlide22
The platform also has APIs which let you determine what types of input are available on the current device
KeyboardCapabilitiesMouseCapabilitiesTouchCapabilities
These give basic information (such as whether or not the input class is supported at all) as well as more detailed information if desired (such as how many touch points the screen supports)
Device Capabilities
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide23
Code Walkthrough – Device CapabilitiesSlide24
GestureRecognizer provides information and events about more complex user actions, such as:
ManipulationsTapsHolds
A
nd more
GestureRecognizer
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide25
Code Walkthrough – GestureRecognizerSlide26
Make your apps buttery smoothSlide27
Ensures your app has the best performance, lowest latency input delivery for advanced scenarios
CoreInput handles input on a separate thread, ensuring it is never blocked by the UI thread
SwapChainPanel
gives you a DirectX rendering surface in your XAML app
CoreInput
and
SwapChainPanel
Frameworks and Controls
Pointer and
GestureRecognizer
CoreInput
and
SwapChainPanelSlide28
Code Walkthrough – CoreInput and SwapChainPanelSlide29
Ink
Gamepad
Text
Device and form factor APIs
Visual feedback
Touch targeting
But wait!
There’s more!
Other APIs to be Aware ofSlide30
When designing your app, be aware of the guidance for touch and other inputsAspects like control size and placement, whitespace, and visual design all affect a user’s perception of what is
interactable
Sidebar – Designing for All InputsSlide31
Sessions:681 - Introducing Direct Ink: Learn how to Unlock New Opportunities Using Ink in Your App
705 - Harness the full power of Digital Inking in your Universal Windows app with Ink Recognition, Advanced Ink Processing and more716 - Cortana and Speech Platform in Depth
679
- From the Small Screen to the Big Screen: Building Universal Windows App Experiences with
XAML
703 -
Optimizing Universal Windows Apps for Continuum: How to Make the Most of the Big Screen with Your Small Screen
658 –
Windows User Experience: Models, Patterns, and Controls
Additional ResourcesSlide32
Samples:Input:
XAML user input events sample https://
code.msdn.microsoft.com/windowsapps/Input-3dff271b
Input: Instantiable gestures sample -
https://code.msdn.microsoft.com/windowsapps/Input-Instantiable-deda69ca#content
Input
:
Gestures
and manipulations with GestureRecognizer -
https://code.msdn.microsoft.com/windowsapps/Manipulations-and-gestures-362b6b59
Input: Device
capabilities sample -
https://code.msdn.microsoft.com/windowsapps/Input-device-capabilities-31b67745
Input: Touch hit testing sample - https://code.msdn.microsoft.com/windowsapps/Touch-Hit-Testing-sample-5e35c690DirectX swap chain
implementation sample - https://code.msdn.microsoft.com/windowsapps/CoreWindow-Sample-b51b01f2
Additional ResourcesSlide33
Writing a UWP
app allows your app to be used by the largest possible audience (hundreds of millions of users!) on a wide variety of devicesThe best-selling apps are those which work well across devices and inputs
Our
platform makes it easy to handle different types of
input
Now unleash your creativity and build the next great app with the confidence that it will work great across all devices!
Call to ActionSlide34