1 / 24

Making the Most of the Microsoft Silverlight and WPF Designer in Microsoft Visual Studio 2010

Required Slide. SESSION CODE: DEV313. Making the Most of the Microsoft Silverlight and WPF Designer in Microsoft Visual Studio 2010. Mark Wilson-Thomas & Mark Boulter Program Managers, Silverlight & WPF Designer Team Microsoft Corporation. What You’ll Learn From This Talk.

clark
Download Presentation

Making the Most of the Microsoft Silverlight and WPF Designer in Microsoft Visual Studio 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Required Slide SESSION CODE: DEV313 Making the Most of the Microsoft Silverlight and WPF Designer in Microsoft Visual Studio 2010 Mark Wilson-Thomas & Mark Boulter Program Managers, Silverlight & WPF Designer Team Microsoft Corporation

  2. What You’ll Learn From This Talk • Visual Studio 2010 WPF and Silverlight Designer Tips and Tricks for Productivity • Using designer features even when editing XAML • Using the data and sample data features of the designer • Common designer load issues and how to avoid them

  3. Demo 1: Using the Properties Window for Fun and Profit, Whether in Design or XAMLView Mark Wilson-ThomasProgram Manager, Silverlight & WPF Designer TeamMicrosoft Corporatio DEMO

  4. Recap: Key Points from Demo 1 • Use the Properties Window to get help and direction whether in the design view or the XAML view • Activate the designer when in a Resource Dictionary or App.xaml to get help from the Properties Window • Answering the question “Why is my button Red” by using Go To Definition • Style IntelliSense • Using multi-select with the Doc Outline to change a value across many elements

  5. Demo 2: Building up a Data Centric ApplicationScaffolding, Sample Data, Customization, Styling Mark BoulterProgram Manager, Silverlight & WPF Designer TeamMicrosoft Corporation DEMO

  6. Demo 2: Product Catalog Application DEMO

  7. Recap: Key Points from Demo 2 Use the Data Source Window to quickly create your UI Use the Binding Picker and Sample Data to easily set up and understand your Bindings at design time Use the “Data Can” to find and configure your DataSource Use Find/Apply Styles and Resources with Resource Picker Use Sample Data, a “Debug Converter” and the new Trace options dialog to track down and fix binding errors

  8. How To Make Your Application “Safe for Design Time” Avoiding Common Pitfalls that Stop the Designer Loading Mark BoulterProgram Manager, Silverlight & WPF Designer TeamMicrosoft Corporation DEMO

  9. Things to know • Look @ the help when you get a load error • Your code runs @ design time (but not always) • What does run: Everything that gets created in the XAML • Instances of Controls and UserControls • ValueConverters • Classes referenced as resources • What does not run: The top level thing you are designing • Window, UserControl, Page etc. whenyou are designing it • Your Application class

  10. Common errors • The most common cause of issues is assuming a runtime environment • Examples: • a UserControl instance calling a web service • a ValueConverteraccessing a value that does not exist @ design time • trying to access a resource from code behind that only exists on the real instance • trying to access properties on objects that we don’t create @ design time • trying to read files relative to the application root

  11. Debugging tips • Look @ the exception information in the gold bar • If you get a load failure screen look @ the whole stack trace • Use a second copy of VS to debug the first • Turn off “Just my code” • Add the “Attach to Process” command if needed • Delete the .suo file or bin and obj directories to avoid crashes on start up

  12. Debugging tips • Look @ the exception information in the gold bar • If you get a load failure screen look @ the whole stack trace • Use a second copy of VS to debug the first • Turn off “Just my code” • Add the “Attach to Process” command if needed • Delete the .suo file or bin and obj directories to avoid crashes on start up

  13. How to turn things off • Use DesignerProperties.GetIsInDesignMode (WPF & SL) • Use DesignerProperties.IsInDesignTool (SL) • Use d:DesignInstance or d:DesignData to enable databinding design time without creating instances of your classes

  14. Demo3: How To Make Your Application “Safe for Design Time” Avoiding Common Pitfalls that Stop the Designer Loading  DEMO

  15. Recap: Key Points from Demo 3: • Common places where your code can cause issues • Constructors for Hosted Controls (UserControl, Page etc) • Convertors • DataTemplate Selectors • UserControl Load Methods • Use GetIsInDesignMode to branch round code that shouldn’t run at Design Time • Debug design time issues by: • Using the Designer Goldbar • Attaching a second Visual Studio instance

  16. Summary • Use the Prop Window to get help editing and navigating whether using Designer or XAML editor • Use Design Time Data (Sample Data) for a better experience designing your app • Use the Data Sources Window for an easy app scaffolding experience, customize with the Data Binding Picker and Resource Picker • Make your app safe for design time by trapping issues in Constructors and Converters 

  17. Useful Resources • WPF and Silverlight Designer Team Blog (Learning,FAQs, Announcements) • Includes a post and source code for the sample application we built • Upcoming post with much more detail on use of Sample Data • http://blogs.msdn.com/wpfsldesigner • Silverlight and WPF Designer Forum • The best place to interact with the team • http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner • Email: mwthomas@microsoft.com or markbou@microsoft.com • Twitter: @MarkPavWT

  18. Want to change the future of technology? Good. So do we. • Microsoft Developer User Research would like to invite you to participate in Usability studies! • Give us your feedback and help drive innovation • Fill out our survey and sign up to participate in upcoming studies for developers! • Drop it off at our booth-DAT#5-DAT Track within the Yellow area/zone of the TLC • Free Microsoft products for participating • Too busy to fill out the survey? Contact Christine Alluise @ devur@microsoft.com

  19. Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Track Resources • Visual Studio – http://www.microsoft.com/visualstudio/en-us/ • Soma’s Blog – http://blogs.msdn.com/b/somasegar/ • MSDN Data Developer Center – http://msdn.com/data • ADO.NET Team Blog – http://blogs.msdn.com/adonet • WCF Data Services Team Blog – http://blogs.msdn.com/astoriateam • EF Design Blog – http://blogs.msdn.com/efdesign

  20. Required Slide Resources Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers • http://microsoft.com/technet • http://microsoft.com/msdn

  21. Required Slide Complete an evaluation on CommNet and enter to win!

  22. Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31st http://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registrationJoin us in Atlanta next year

  23. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

  24. Required Slide

More Related