250 likes | 447 Views
Required Slide. SESSION CODE: WCL202. My Favorite Windows Presentation Foundation 4 Features. Ken Getz Senior Consultant MCW Technologies, LLC. Me.About. Senior Consultant with MCW Technologies Author of several developer’s books on ASP.NET, VB, Access, and VBA
E N D
Required Slide SESSION CODE: WCL202 My Favorite Windows Presentation Foundation 4 Features Ken Getz Senior Consultant MCW Technologies, LLC
Me.About Senior Consultant with MCW Technologies Author of several developer’s books on ASP.NET, VB, Access, and VBA Lead courseware author for AppDev (http://www.appdev.com) keng@mcwtech.com
Agenda • New Controls and Data Binding • WPF and Silverlight Designer • Visual State Manager • WPF and Windows
New Controls • WPF 4.0 includes new controls: • DataGrid • Calendar • DatePicker • Outside of Visual Studio • Can download Ribbon control • Provides Office-like functionality
DataGrid Control • Most often used in connection with WPF data binding • Example demonstrates using bound data • DataGrid displays data in grid of rows and columns • Specify data source using the ItemsSource property • By default, DataGrid auto-generates columns based on the data source
DataGrid Control • Column types: • DataGridTextColumn • DataGridCheckBoxColumn • DataGridComboBoxColumn • DataGridHyperlinkColumn
Data Binding • WPF adds support for standard drag and drop data binding • Feels similar to Windows Forms data binding • Designer creates necessary code to fill and bind data sources • Data handling provided by data mechanisms • Similar to binding in Windows forms
DEMO • Demonstrate Data Binding and DataGrid control
WPF (and Silverlight) Designer • Improved support for Silverlight • Same designer for WPF and Silverlight applications • Visual Databinding • New data binding builder enables visual construction and editing of bindings—no XAML required • Already seen, in previous demo • Auto Layout • More intuitive Grid designer and better support for automatically sizing user controls • Improved Property Editing • Can visually create/edit Brush resources
DEMO • Work with WPF designer
Calendar Control • DisplayMode • Decade, Month, Year • SelectionMode • MultipleRange, None, SingleRange, SingleDate • SelectedDate, SelectedDates properties • DisplayDateStart/DisplayDateEnd • SelectedDatesChangedevent
DatePicker Control • Combination of TextBox and Calendar
Visual State Manager • Enables you to specify: • States for a control • Appearance of a control in a certain state • When a control state changes • For example: • Button might have slightly different appearance when pressed vs. not pressed • Button control defines states Normal and Pressed • Appearance of control when in a state defined by a VisualState • Contains a collection of Storyboard objects
Visual State Manager • Add visual states to a control by setting VisualStateManager.VisualStateGroups • Each VisualStateGroup contains a collection of mutually exclusive VisualState objects • Control is always in exactly one state • VSM allows you to specify when control enters a specific state • For a given state, can specify a StoryBoard • Can supply transitions
Easing Functions • Determines the “shape” of the transition • Built-in quadratic, exponential, and more • For full demo of easing functions: • http://samples.msdn.microsoft.com/Silverlight/silverlight_next/Animations/easing_functions_gallery/testpage.html
DEMO • Create VisualStateManager for Rectangle
WPF and Windows • WPF adds support for Windows features • System.Windows.Shell namespace adds support for Windows 7 features like: • Jumplists • TaskBar Items • WPF adds support for custom places on dialog boxes • Demo works with TaskBarItemInfo and JumpLists
DEMO • TaskBarItemInfo
Thanks for Coming! • WCL202--My Favorite Windows Presentation Foundation 4 Features • Ken Getz • keng@mcwtech.com
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Track Resources • Learn about Windows Client Development: http://developforwindows.com • Try out the Internet Explorer 9 Platform Preview: www.ietestdrive.com • Interested in Windows hardware or software? Check it out: http://ReadySet7.com
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
Required Slide Complete an evaluation on CommNet and enter to win!
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
© 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.