We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byTomas Millhouse
Modified over 2 years ago
© 2012 Autodesk Developing a simple Metro-style application for Windows 8 Kean Walmsley Software Architect, Autodesk
© 2012 Autodesk About the Presenter Kean joined Autodesk in August 1995, and has since worked in a number of different positions and countries (UK, USA, India and Switzerland). He recently moved from the Autodesk Developer Team into the AutoCAD Engineering organisation, where he now works as a Software Architect. Since July 2006 Kean has maintained a development-related blog at: blogs.autodesk.com/through-the-interface blogs.autodesk.com/through-the-interface Kean holds a Licence dInformatique from lUniversité de Paris-Sud and a Masters in Computer Science from the University of Kent at Canterbury.
© 2012 Autodesk Class Summary Covers the basic concepts around the WinRT sub-system of Windows 8, showing how to develop a simple, touch-enabled application that acts as a companion to AutoCAD. We will look at the various contracts available to WinRT developers, and understand the limitations inherent to working inside the WinRT sandbox, including the need for asynchronous calls into many WinRT APIs. The sample covered - while not working directly inside AutoCAD - will extract MRU information related to AutoCAD drawings in a format that can be used by our Metro-style browser application.
© 2012 Autodesk Learning Objectives At the end of this class, you will be able to: Extract MRU information from the Windows Registry, storing it in XML Understand the limitations imposed on applications by WinRT, including the use of asynchronous calls Create a simple, Metro-style MRU browser application Implement contracts to enable search, sharing, settings and snapping
© 2012 Autodesk Introducing Windows 8 and WinRT
© 2012 Autodesk Windows 8 Latest generation of the Windows OS A critical release for Microsoft A bold departure with Windows Runtime, while focusing on legacy Hybrid of touch-oriented and Desktop environments Desktop apps – such as AutoCAD – will work with modest investment More modern apps will work on ARM tablets such as Microsoft Surface Easily adapted to Windows Phone 8
© 2012 Autodesk Windows Runtime – The New Sandbox on the Block Microsofts answer to the Android and iOS execution sandboxes Commonly abbreviated to WinRT.NET was not considered the best technology for targeting mobile Technologically or politically driven? A new layer on top of the Windows OS A set of core API services Can be used from various languages No longer required or possible to use P/Invoke
© 2012 Autodesk WinRT – How it looks different A whole new design language has been created Not only for Windows 8 Also found on Windows Phone, Zune, Xbox Previously known as Metro, but has since been rebranded Metro-style apps became… Modern UI style apps … and more recently… Windows Store apps A full-screen, touch-friendly user experience
© 2012 Autodesk WinRT – How it looks different Inspirations Bauhaus Swiss typography Motion Design Design principles Pride in craftmanship Fast and fluid Authentically digital Do more with less Win as one
© 2012 Autodesk WinRT – How it is different The tools are familiar, but this is pretty different Different object model for OS capabilities Asynchronous operation enforced for anything but instant responses Strict control over disk access Application interop only via contracts or file associations
© 2012 Autodesk The WinRT Object Model But it is.NET or not? No, it isnt, but its made to feel like it Underlying mechanism is actually COM WinRT and CLR type systems are distinct Merged by metadata adapter If coding in.NET, you target the.NETCore CLR profile Only exposes approved APIs You can try to circumvent them, but not if you want to be on the Windows Store
© 2012 Autodesk Asynchronous operations are now the norm Any call that might take over 50ms is now asynchronous-only Means that any long running call doesnt block the UI thread Ensures a fluid UI experience (no more whitened windows) No great coding overhead with async/await Typical code looks like this: var file = await KnownFolders.DocumentsLibrary.GetFileAsync( file.txt );
© 2012 Autodesk Restricted access to the file system Applications can access files in a few locations Modify Package.appmanifest to request… Capabilities to add/change/delete files in specific locations e.g. Documents Library, Removable Storage Declarations associating the app with specific file-types Permissions get requested when installing the app More freedom when handling a user-selected file Selection implies permissions have been granted for that file
© 2012 Autodesk Application interop App interop has been deliberately limited in WinRT Even if underpinnings are based on COM Imposes good behaviour on WinRT apps, but restrictive File system and Registry isolation make it hard to share data WinRT apps can interoperate via the Share contract Apps can be tied together at the user-level via the Share charm e.g. a photo can be shared with an email client WinRT apps can launch the desktop app associated with a file-type
© 2012 Autodesk Additional points about WinRT apps Really intended for lightweight, tablet-focused apps 32-bit only, implicit memory limitations Applications dont even have a close button Termination/resurrection is at the whim of the OS The expectation is not that apps such as AutoCAD get ported And without a WinRT-based AutoCAD, there is no WinRT API for it So what application possibilities are there? Especially with interop being so limited
© 2012 Autodesk What can be done with AutoCAD? Companion apps are an interesting possibility Windows Store apps that complement desktop apps such as AutoCAD A fun example is to browse AutoCADs MRU file data Browsing data is a great use-case for WinRT The WinRT app can launch AutoCAD with a file If AutoCAD is currently associated with the.DWG file-type If the file is located in an accessible location
© 2012 Autodesk Implementing an AutoCAD MRU browser
© 2012 Autodesk Browsing AutoCADs MRU data in WinRT Cannot access MRU data directly from a WinRT app AutoCADs data is in the Registry and therefore not directly accessible A specific export needs to be run from a desktop-hosted app Could be inside AutoCAD or otherwise Write some files that are then loadable from within WinRT With appropriate application permissions, of course Ideally an automatic process Well use a new feature in AutoCAD 2013, the Core Console…
© 2012 Autodesk Extracting AutoCAD MRU data from the Registry Lets build a simple C# app that queries the Registry Writes an XML file with the MRU data Extracts thumbnails from each of the drawings Also copies the drawings to a local folder Contrived example, but allows us to launch The project references AcCoreMgd.dll App will be loadable in AutoCAD and the Core Console Populates a folder thats accessible by the browser app
© 2012 Autodesk Creating the Basic Browser Start with the VS2012 Grid View template A very capable app for data browsing Gives a great deal of basic capabilities From here we can add the various capabilities we need The first step is to get the data into the browser Some work needed to manipulate the data source And then have the XAML bind to it
© 2012 Autodesk Semantic Zoom Pinch-zoom to see data at different levels of detail Very handy for providing a summary view of your data Requires some work in XAML to implement SemanticZoom.ZoomedInView SemanticZoom.ZoomedOutView If using keyboard and mouse Ctrl + mouse-wheel
© 2012 Autodesk Contracts Implement contracts to support Windows 8 charms Share Search Settings All require using the static GetForCurrentView() method On a variety of different classes More on this over the coming slides
© 2012 Autodesk Contracts – Share Implemented by DataTransferManager.DataRequested event Add a handler when your item is created Populate the DataTarget with the data you want to provide Warning: the Mail app is a little strange as a Share target If you add attachments it blanks the Title and Subject Theres a Share Target sample on MSDN that works more predictably
© 2012 Autodesk Contracts – Search Implemented by SearchPane.QuerySubmitted event Add handler when app is launched Generate a group of items that meet the search criteria Navigate to that group so they are displayed in the UI Easy to implement using LINQ var query = from item in Items where item.Content.Contains(queryText) select item;
© 2012 Autodesk Contracts – Settings Implemented by SettingsPane.CommandsRequested event Add handler when app is launched From here you register your commands When your commands event handler fires, update the settings Application.Current.RoamingSettings Follows user between devices via Live ID Adjust the UI as appropriate to reflect changed setting
© 2012 Autodesk Live Tile Notifications Apps can provide notifications to the user via Start screen tiles Tiles can be static or live Different formats to choose from If wide, the user can also choose to make them square Managed via Windows.UI.Notifications.TileUpdateManager Cycles through up to 5 live tiles
© 2012 Autodesk Snapping Two apps docked on the same screen Both WinRT apps or one can be desktop Snapped view up to 320 pixels wide Very handy for companion apps Implemented via XAML (or HTML) Snapped visual style Contains a storyboard animating controls
© 2012 Autodesk Launching Its possible to launch the application associated with a file-type var file = await KnownFolders.DocumentsLibrary.GetFileAsync(A.dwg); await Launcher.LaunchFileAsync(file); The file needs to be in a known, application accessible folder Limits the ability to open files in arbitrary locations Why our MRU extractor makes local copies of DWGs to be browsed/opened
© 2012 Autodesk Summary Windows 8 is new and parts of it are very different Windows RT, the mobile-focused sub-system Windows Store app development familiar but challenging Restrictions intended to improve trust and responsiveness Significant restrictions when looking at desktop app interop Possible to implement interesting new capabilities for companion apps Semantic Zoom Contracts for Search, Share & Settings Live tile notifications, Snapping, Launching
© 2012 Autodesk Autodesk, AutoCAD* [*if/when mentioned in the pertinent material, followed by an alphabetical list of all other trademarks mentioned in the material] are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product and services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document. © 2012 Autodesk, Inc. All rights reserved.
© 2011 Autodesk CP5239 Demand-Loading AutoCAD®.NET Plug-ins James E. Johnson Synergis Software Sr. CAD Developer.
© 2012 Autodesk Customizing AutoCAD P&ID David Wolfe Process and Power Specialist.
© 2011 Autodesk Moving from Desktop to Cloud Albert Szilvasy Software Architect, AutoCAD Engineering Team.
© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant.
Scripting Components for AutoCAD Plant 3D
© 2012 Autodesk BIM on an Etch a Sketch Jose Guia Janitor extraordinaire
© 2012 Autodesk Implementing Cloud-Based Productivity Solutions with the AutoCAD® ObjectARX® API Ravi Krishnaswamy Senior Software Architect.
© 2012 Autodesk Have a tablet? The handout is available for iBooks, Kindle, and Adliko.
Join us on Twitter: #AU2013 Building Well-Performing Autodesk® AutoCAD® Applications Albert Szilvasy Software Architect.
© 2012 Autodesk Pressure Pipe Networks in AutoCAD ® Civil 3D ® 2013 Matthew Anderson Technical Consultant, Autodesk Jim Paquette Software Development Manager.
Brown University Swim Center
© 2012 Autodesk From Nothing to Something using AutoCAD ® Electrical Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
© 2012 Autodesk MP2005 Autodesk Revit Architecture Room Data and AutoCAD MEP: You Did What with the Xdata? Jeff Campbell Senior Applications Specialist,
© 2012 Autodesk Get Your Head into the Cloud: How to Make Digital Asset Management Work for You Oscar R. Cantu’ Topcon University.
© 2012 Autodesk Autodesk ® Navisworks ® 2013 What’s New Presenter Name Presenter Title.
Join us on Twitter: #AU2014. Class summary text goes here Class summary.
© 2011 Autodesk How to Excel at Data Extraction Martin Duke CADD Manager – Aurecon - Queensland.
© 2011 Autodesk Publishing Infrastructure Data to Map Books GS3341 Andy Morsell, P.E. Consultant Autodesk Global Services Utilities & Telecom Consulting.
Introduction to the Windows Runtime (WinRT) Ben Dewey Tallan, Inc.
© 2012 Autodesk Autodesk® Civil 3D® 3D Studio Max Design®: Civil View For All Vincent Sheehan Sr. Designer, Timmons Group.
© 2012 Autodesk AutoCAD ® Virtualized and Digitized michael trachtenberg - AE BackOffice Software Director.
Designing metro style apps for Windows 8 A walkthrough some UI / UX best practices Lanny Geffen, Creative Director, Digiflare.
© 2012 Autodesk Gordon Luckett – Municipal Asset Management with Autodesk® Software Gordon Luckett GIS Consultant, Developer.
Join us on Twitter: #AU2013. An appropriate image has been provided for your presentation based on the AU look and feel You can replace the Title.
© 2011 Autodesk The Suite Life of AutoCAD® Guillermo Melantoni Sr Product Manager: Workflows and Interoperability at Autodesk.
© 2012 Microsoft Corporation. All rights reserved. Be more productive. Windows 8 helps you get more done in less time.
© 2012 Autodesk SE2070 Unlimited Round-Tripping with the RISA-Revit® Link Matt Brown, P.E. RISA Technologies.
© 2011 Autodesk Managing Your AutoCAD®/RealDWG® Model Memory Footprint for Better Performance Bill Adkison MarinCAD Software Engineering CP4286-U November.
© 2012 Autodesk The Picture Says It All: Commercial Site Plan 3D Visualizations Using Autodesk® IDS John Sayre Civil Application Engineer.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
© 2012 Autodesk Presenter’s First and Last Name Presenter’s Title AutoCAD ® Architecture 2013 What’s New Image courtesy of Wilson Architects.
© 2012 Autodesk Dario Nicolini Product Manager Autodesk ® Inventor ® iLogic: a great Autodesk tool to improve Inventor features.
© 2014 Autodesk Getting started with Desktop Subscription.
Customizing Autodesk® Navisworks® 2013 with the .NET API
Building RADNUG8 – the windows 8 app Part 1 Matt
© 2011 Autodesk Organize and Manage Your Intellectual Property with Autodesk® Vault Workgroup Projects Pascal Le Guellec Market Development Consultant,
© 2012 Autodesk #AU2012 MA5956-V: Module 1 How to Drive Autodesk Inventor with the Top Down Paul Munford CAD/CAM Manager Halstock cabinet makers.
© 2012 Autodesk AutoCAD® API.NET Tips and Tricks James E. Johnson Application Developer for Synergis Software.
© 2012 Autodesk M5935-V Integrating SAP® with AutoCAD® Bill Svokos CIDEON consultant SAP PLM.
© 2012 Autodesk Conceptual and Design Workflows Using Autodesk ® 360 Integrated Applications Anirban Ghosh Principal User Experience Designer – DLS Mobile.
© 2011 Autodesk AutoCAD LT ® 2012 Whats New. © 2011 Autodesk AutoCAD LT 2012 | Experience Productivity With AutoCAD LT ® 2012 software, incremental improvements.
© 2012 Autodesk The Enterprise Guide to Autodesk Revit Harlan Brumm Program Manager - Autodesk.
Getting Started with Fusion 360’s API
© 2012 Autodesk Project Architect-Times-a-Changing: How to transition from yesterday to today Christopher Ozog Project Architect.
© 2011 Autodesk Importing the Most Useful Data Into Survey in AutoCAD Civil 3D 2012 Russ Nicloy Civil Applications Engineer.
© 2011 Autodesk CM D Standards : New Thinking Allan Chalmers – Kempe Engineering Kevin J. Smedley – Engineering Design Systems, Inc.
Using Geotechnical Data in AutoCAD® Civil 3D
© 2011 Autodesk Navigating Through the Corridor using AutoCAD® Civil 3D®.NET API Augusto Goncalves Senior Developer Consultant at Autodesk.
© 2011 Autodesk Optimizing Digital Drawing Files and BIM Models for Measurement and Estimating Simon Lovegrove MRICS, AAIQS Director, Exactal.
Windows 8 Hot or Not Piotr Włodek. Agenda MetroCharms Contracts WinRT App Execution Environment Motion Summary.
© 2017 SlidePlayer.com Inc. All rights reserved.