20 tooling and diagnostics
DESCRIPTION
Building Apps for Windows Phone 8.1 Jump Start . Videos at: http://channel9.msdn.com/Series/Building-Apps-for-Windows-Phone-8-1TRANSCRIPT
Matthias Shapiro @matthiasshapAndy Wigley @andy_wigley
Tooling and Diagnostics
30 April 2014
This module…
Visual Studio ToolingUniversal Visual Studio toolingXAML toolingBlendWeb Debugging
Windows Phone EmulatorDiagnostics and Memory ProfilingDebugging Tips and Tricks
Visual Studio Tooling – C#
3 Projects in 1 Solution
Windows 8.1 Project
Windows Phone 8.1 Project
Shared Project
Universal App Templates
Existing Windows 8.1 app can add Windows Phone 8.1 project with shared project.
Adding Windows Phone to a Windows App
Share source between converged appsNo binary outputShared Projects support all file types
Code Files .cs, .js, .cpp, .hXAMLImages .png, .jpg…RESWXML, etc
Shared Project in a Universal Solution
Use #if to navigate differences between Windows and PhoneWindows = WINDOWS_APPWindows Phone = WINDOWS_PHONE_APP
Example: Hardware back button is Windows Phone only
#if Compiler Conditionals
#if WINDOWS_PHONE_APPWindows.Phone.UI.Input.HardwareButtons.BackPressed +=
this.HardwareButtons_BackPressed;#endif
Intellisense warns if code is platform specific
Switch project context using navbar
Switching Code Contexts
Quick and easy way to change startup projects
Supported for all Store platformsEnabled if you have more than 1 app project in the solution
Universal Project Targeting
Set as a property in the solution
Launch both projects together
Multi-Project Targeting
Visual Studio Tooling – XAML
Split Design/XAML View
Control Toolbox
Document Outline
Properties Pane
XAML in Visual Studio
Switch View from Windows to PhoneView UI Element In Visual TreeView Set Properties for UI Elements
Viewing And Navigating XAML
Resource IntellisenseShows all available resources for UI Element
Binding IntellisenseShows properties available in current data context
XAML Intellisense
Right click, “Go To Definition”
For resources, opens XAML where resource is defined
For bindings, opens bound object class
“Go To Definition…”
Change display size of the design pane
Change accent, theme
See how XAML looks in all conditions without running several emulators
XAML Device Pane
Tooling Features in C# and XAML
demo
XAML Design and Visual EditingAnimation BuilderControl State EditorSample DataPortable Alignment Guides
Visual Studio Blend
Visual Studio Blend
demo
Attaches IE debugger to emulator browserJavaScript ConsoleDOM Explorer
Debugging Web Pages on Phone
Windows Phone Emulator
Windows Phone Emulator
Windows Phone Virtual MachineRequires HyperV
Emulate screen resolutsions & physical size
Windows Phone EmulatorTouch pass-through for touchscreen devices
Multi-touch simulation
Windows Phone EmulatorTouch pass-through for touchscreen devices
Multi-touch simulation
Rotate emulator
Windows Phone EmulatorTouch pass-through for touchscreen devices
Multi-touch simulation
Rotate emulator
Many more tools
Accelerometer
Drag red dot to change accelerometer readings
Create geolocations liveChange accuracy
Rural, urban, suburban emulation
Create route with geolocations
Navigate route at different speeds
Save and load geolocation set
Location Simulation
Emulate fast, slow or no networks
Simulate good or poor signal strength
Network Simulation
Toggle sensor availability on the device
Simulate phone without NFC or
front facing camera
Sensor Simulation
Mount local directory as SD Cardtest saving and load files from SD Card
SD Card
Simulate all notification types and templates
TileToastBadgeRaw
Notification Simulation
Windows Phone Power Tools
Performance MonitorConnect to emulator for real time diagnostics of full system
Performance RecorderETW trace capturingSelect performance profiles for CPU, GPU, File or Disk I/O, Audio, Video, IE, and many more
Diagnostics and Memory Profiling
Performance and Diagnostics Tool
Diagnostics Tool For RecordingCPU UsageEnergy ConsumptionMemory Usage XAML UI Responsiveness
Memory Profiling
demo
Debugging Tips and Extras
Debug Location toolbar allows:SuspendResume Shutdown
Good for debugging events triggered by lifecycle changes
Debugging Lifecycle Events
In some cases, an app will launch from another app
Share ContractsFile PickersSpeech Commands
Debugging App Launch
JSON Visualizer added to view JSON strings in an easy-to-read format
JSON Visualizer
blogs.msdn.com/b/visualstudioalm/archive/tags/diagnostics
And more…
©2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.