what is new in wpf 3.5 sp1

31

Upload: rsnarayanan

Post on 10-May-2015

1.190 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: What Is New In Wpf 3.5 Sp1
Page 2: What Is New In Wpf 3.5 Sp1

Windows Presentation Foundation What is new?

Pandurang NayakClient Platform EvangelistMicrosoft Corporation

Page 3: What Is New In Wpf 3.5 Sp1

.NET Framework and Tools Roadmap

2006.NET Framework 3.0VS 2005 Extensions for .NET 3.0 (CTP)

2007.NET Framework 3.5Visual Studio 2008Expression Blend 1.0

2008.NET Framework 3.5 SP1Visual Studio 2008 SP1Expression Blend 2.0

Page 4: What Is New In Wpf 3.5 Sp1

.NET Framework 3.5 SP1

WPF EnhancementsOther Enhancements (ASP.NET,

etc.)

.NET Framework 3.5WPF 3.5

LINQAdd-in

FrameworkWF & WCF

Enhancements

.NET Framework 3.0

WPF CardSpaceWCF WF

.NET Framework Roadmap

.NET Framework 2.0

CLR Base Class LibraryWinForms/ ASP.NET

SP1

SP1

Page 5: What Is New In Wpf 3.5 Sp1

WPF in a nutshell

Rich Windows ApplicationsGreat Architecture + Great GraphicsRapid Prototyping

2D, 3D, Vector, Document Flow, Layouts, Composition, etc.

Page 6: What Is New In Wpf 3.5 Sp1

WPF 3.5 Enhancements•.NET Framework Client Profile •~25MB client subset of .NET Framework•Customized install experiences

Deployment

•Interactive 2D on 3D•Pixel Shaders and Effects Model•DirectX Interop•New Controls

Graphics

•Cold Startup Improvements•Several perf enhancements•Profiling tools and instrumentation

Performance

Page 7: What Is New In Wpf 3.5 Sp1

.NET Client Profile

~25MB Client-only Subset of .NET FxIncludes WinForms, WPF, LINQ, etc.Excludes ASP.NET, WCF, etc.

200KB fully customizable Bootstrapper

Page 8: What Is New In Wpf 3.5 Sp1

.NET Framework Client ProfileUsing the Client Profile Deployment option in Visual Studio 2008 SP1

DEMO

Page 9: What Is New In Wpf 3.5 Sp1

WPF 3.0 Graphics Recap

Rich set of 2D drawing primitivesBasic 3D functionality via Viewport3DRich Media IntegrationExtensive Animation SystemAdvanced Text StackBitmap EffectsImagingCompositor

Page 10: What Is New In Wpf 3.5 Sp1

WPF 3.5 Graphics EnhancementsTrue Interactive 2D-on-3DPixel Shaders Effects Model

Hardware-Accelerated HLSL Support

DirectX InteropInterop Bitmap

Replaces Writeable BitmapFaster Layered Window SupportAnimation Fixes

Page 11: What Is New In Wpf 3.5 Sp1

Graphics EnhancementsInteractive 2D on 3DPixel Shader Effects

DEMO

Page 12: What Is New In Wpf 3.5 Sp1

New ControlsWeb Browser Control

Interop between HTML and WPF contentWPF -> HTML

WPF application can call script methods in HTML with WebBrowser.InvokeScript

HTML -> WPFScript in HTML can call methods and access properties on WebBrowser.ObjectForScripting that are COM-Visible with window.external

Load hosted HTML content from a stream or stringAccess the document object loaded in the WebBrowser

Page 13: What Is New In Wpf 3.5 Sp1

New ControlsDataGrid Control

Available from WPF Toolkit (www.codeplex.com/wpf)CTP Release with several features, being further improved upon

Ribbon-UI ControlPart of a future release with other controls and style templates

Page 14: What Is New In Wpf 3.5 Sp1

New ControlsWeb Browser, Ribbon and DataGrid

DEMO

Page 15: What Is New In Wpf 3.5 Sp1

Performance EnhancementsGreatly improved cold start time

>15% cold start gains for small apps>35% cold start gains for large apps

XBAP cold start improvements (real + perceived)

~10% faster XBAP cold start in addition to gains above by improving the concurrency of the ClickOnce download sequence Instant (HTML) download progress UX to improves perceived XBAP startup

Page 16: What Is New In Wpf 3.5 Sp1

Performance Enhancements

Splash Screen to improve perceived startup for Standalone apps

New public SplashScreen APIsIntuitive VS integration (3 clicks to enable)“Add / New Item…/SplashScreen (WPF)”Sample code available for existing apps or for downlevel targeting

Downloadable VS Template from WPF Futures (www.codeplex.com/wpf)

Page 17: What Is New In Wpf 3.5 Sp1

Perf ToolsSnoop

Generally useful to understand your app, view element tree.

WPFPerf Suite Perf “power toy”, a set of diagnostic tools

Visual Studio Profiler Great for CPU profilingVS Developer Edition and VS Team Suite

CLR Profiler for .NETShows managed memory usage and leaks

Page 18: What Is New In Wpf 3.5 Sp1

Perf ToolsSnoop

Use to understand the size of the app Visual treeUseful to detect Virtualization related issues & large app trees

Page 19: What Is New In Wpf 3.5 Sp1

Perf ToolsSnoop

Customer app lessons learned: Watch for conditions that may turn virtualization off:

• Make sure ScrollViewer.CanContentScroll=True• Make sure VirtualizingStackPanel.IsVirtualizing=True• Keep VirtualizingStackPanel as your default panel …or write own virtualized

panel.• Avoid Grouping

# of elements can grow also when using rich templates

Use Snoop to watch element count

Page 20: What Is New In Wpf 3.5 Sp1

Perf ToolsWPF Perf Suite

Available for external download (WPF SDK & forums)Initial diagnosis of over-invalidation & software renderingA set of tools:

Perforator: Analyzes general rendering behaviorVisual Profiler: Provides breakdown of an object's use of WPF services, such as rendering and layout String profiler (new): Analyzes where strings are being allocated Event Trace: Analyze events and generating event log filesTrace Viewer: Record, display, and browse ETW log files in a WPF user-interface format

Page 21: What Is New In Wpf 3.5 Sp1

Perf ToolsWPF Perf Suite: Perforator

To detect low perf b/c SW rendering:Tint SW rendering: Draws purple when falling back to SW (or when SW api used, old driver, card, layered windows on XP, etc)# SW Render Targets: If not 0, significant perf problem (old card, layered windows on XP)# HW Render Targets: # should be equal to the number of app windows times # of display adapters. Indicates app running in HW

Low perf indicatorsLarge # of Intermediate Render Targets: additional images that WPF needs in order to get content ready for drawingMaximum SW/HW IRTs per Frame: Shows max # of surfaces needed to render any one frame of the application. Usually caused by the use of DrawingBrush, VisualBrush, Opacity, or Tile modes on a TileBrush. If # high (e.g. > 7), indicates a potential perf issue

Page 22: What Is New In Wpf 3.5 Sp1

Perf Tools - Perforator

Page 23: What Is New In Wpf 3.5 Sp1

Perf ToolsWPF Perf Suite: Visual Profiler

Inspect the Visual Tree Show “hot path” of layout time: Tints the elements in the tree based on their time spent in layoutShows inclusive/exclusive times and element countsHistory graph of time breakdown: Helps identify whether an application’s bottlenecks lie in layout, rendering, animation, etc

Page 24: What Is New In Wpf 3.5 Sp1

Perf Tools - Visual Profiler

Page 25: What Is New In Wpf 3.5 Sp1

Perf ToolsETW Event Trace & Event Trace Viewer

Useful to view low-level WPF ETW events. WClientUceNotifyPresent: Use to calculate frames-per-second rendering perf (e.g. during animation, video, etc) WClientLayout: Use to calculate time app spends in laying out controls (e.g. during resize)

Can also use Xperf/Xperfinfo

Page 26: What Is New In Wpf 3.5 Sp1

photoSuruWPF 3.5 ApplicationRunning Snoop on photoSuru

DEMO

Page 27: What Is New In Wpf 3.5 Sp1

ReferencesWhat’s new in WPF 3.5 SP1?

http://windowsclient.net/wpf/wpf35/wpf-whats-new-35sp1.aspx

Introducing .NET Framework Client Profile http://windowsclient.net/wpf/wpf35/wpf-intro-client-profile.aspx

Optimizing WPF App Performance MSDN paperhttp://msdn2.microsoft.com/en-us/library/aa970683.aspx

Snoop tool http://www.blois.us/Snoop

Various performance related blog http://blogs.msdn.com/jgoldb

Page 28: What Is New In Wpf 3.5 Sp1

Contact

Blog Addresswww.thinkingMS.com/pandurang

Email [email protected]

Page 29: What Is New In Wpf 3.5 Sp1

धन्यवा�दઆભા�ર ধন্য�বা�দ

ਧੰ�ਨਵਾ�ਦ

ଧନ୍ୟ�ବା�ଦ

நன்றி�

ధన్య�వాదాలు� ಧನ್ಯ�ವಾ�ದಗಳು

നി�ങ്ങള്‍‌ക്ക്� നിന്ദി�

Page 30: What Is New In Wpf 3.5 Sp1

question & answer

Page 31: What Is New In Wpf 3.5 Sp1

© 2009 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.