DEV331. class Tweet : TimelineItem {…} class DirectMessage : TimelineItem {…} class Notification...
-
Upload
calvin-hunt -
Category
Documents
-
view
213 -
download
0
Transcript of DEV331. class Tweet : TimelineItem {…} class DirectMessage : TimelineItem {…} class Notification...
A Lap around Microsoft Silverlight 5 (Repeats on 5/18 at 8:30am)
Pete Brown (@pete_brown)Developer Community NinjaMicrosofthttp://10rem.net
DEV331
ToolingXAML binding debuggingVisual Studio profiling supportVisual Studio Team Test support
BindingImplicit data templatesAncestor RelativeSource bindingBinding in style settersDataContextChanged event
TextLinked and multi-column text Text layout performance improvementsTracking/leading controlImproved text clarity and pixel snapping
MediaH.264 hardware decodingLow-latency sound Remote-control supportTrick-play
System Access
Unrestricted file access for trusted applicationsRead/write to Documents without a dialogP/Invoke
In-Browser ImprovementsIn-Browser embedded browserIn-Browser trusted applications (group policy)
GraphicsGPU-accelerated 3D based on XNAHardware acceleration in windowless mode enabled via new IE9 APIs
OthersPostscript vector printingCustom Markup ExtensionsCombobox type-ahead and text searchingNetwork latency performance improvementsReal windowsMulti-click with ClickCount propertyMulti-core background JIT for startup improvementsXAML parser performance improvementsLOTS of other fixes and improvements
ToolingXAML binding debuggingVisual Studio profiling supportVisual Studio Team Test support
BindingImplicit data templatesAncestor RelativeSource bindingBinding in style settersDataContextChanged event
TextLinked and multi-column text Text layout performance improvementsTracking/leading controlImproved text clarity and pixel snapping
MediaH.264 hardware decodingLow-latency sound Remote-control supportTrick-play
System Access
Unrestricted file access for trusted applicationsRead/write to Documents without a dialogP/Invoke
In-Browser ImprovementsIn-Browser embedded browserIn-Browser trusted applications (group policy)
GraphicsGPU-accelerated 3D based on XNAHardware acceleration in windowless mode enabled via new IE9 APIs
OthersPostscript vector printingCustom Markup ExtensionsCombobox type-ahead and text searchingNetwork latency performance improvementsReal windowsMulti-click with ClickCount propertyMulti-core background JIT for startup improvementsXAML parser performance improvementsLOTS of other fixes and improvements
Implicit Data Templates
Like regular data templates, but … implicit Does for templates what implicit styles did for styles
Like implicit styles, tied to a data typeClasses/Structs, not interfaces
Use in any content control or items controlReuse chunks of UI throughout application - automatically
Regular (Explicit) Data Templates
class Tweet : TimelineItem {…}class DirectMessage : TimelineItem {…}class Notification : TimelineItem {…}
…
TimelineItem[] items = new TimelineItems[]{ new Tweet(“Pete Brown”, “pete.png”, “…”), new Tweet(“Jon Galloway”, “jon.png” , “…”), new Tweet(“Joe Stagner”, “joe.png” , “…”), new Tweet(“Jesse Liberty”, “jesse.png” , “…”)};
Data DataTemplate
Pete Brown
Jesse Liberty
Joe Stagner
Jon Galloway
Resulting Presentation
Developer Demo Rule #4705: Twitter must appear in any modern demo
New Implicit Data Templates
class Tweet : TimelineItem {…}class DirectMessage : TimelineItem {…}class Notification : TimelineItem {…}
…
TimelineItem[] items = new TimelineItems[]{ new Tweet(“Pete Brown”, “pete.png”, “…”), new Tweet(“Jon Galloway”, “jon.png” , “…”), new DirectMessage(“Joe Stagner”, “joe.png” , “…”), new Notification(“Jesse Liberty”, “jesse.png” , “…”)};
Data Implicit Data Templates
Pete Brown
Jesse Liberty
Joe Stagner
Jon Galloway
Resulting Presentation
Tweet
DirectMessage
Notification
demo
Implicit Data Templates
XAML Debugging
BeforeRealize binding isn’t workingHunt through the output window for any binding failure informationCreate a debug-only value converter, assign it to all your bindings, and put a breakpoint inside itMiss lunch, go home late
NowSet breakpoints in XAML on bindingsHit breakpoints at runtime just as you would with codeInspect values, sources, errors etc.
demo
XAML Debugging
Or, how to make it home in time for dinner
Multi-Column and Linked Text
Flow text from RichTextBox to RichTextBoxOverflow elements
Link as many as you want
Size text elements to work around other elementsSelection works across elements for a transparent experience
Character Spacing
Important for text-heavy layout, headlines and moreControl spacing between characters (Tracking)
Continues to support control of spacing between lines as well
Character Spacing expressed as 1/1000 of font sizeSet on anything derived from Control or TextElement
demo
Text Awesomeness
Operating System Windows
Past ApproachUse the Popup and ChildWindow classes
Constrained to Silverlight drawing surfaceNo multi-display support
Silverlight 5 ApproachPopup and ChildWindow still supportedEnhanced WindowClass for real OS Windows
demo
Native OS Windows
ClickCount
Unlimited click countTypically used for double and triple click
Multi-click gestures are commonMS Word uses double-click to select word, triple click to select paragraphSafari 3, Firefox 3, and IE7: triple click selects all text within an element
Silverlight ImplementationSupports 1 to n clicks (42 click easter eggs, anyone? )Some tricks required if you want both n and n+x clicks (double and triple, for example)
Double-Click
Low-Latency Sound
Eliminates circular queues of MediaElements for near-realtime sound
XNA-based APISoundEffect and SoundEffectInstance classes
Enables playing WAV filesPCM Encoded8 or 16 bit, mono or stereo22.5, 44.1 or 48khz sample rateOther formats will not work, just as in XNA and WP7
Not just for games
demo
Real Time Sound
Things that go “bzzzttt” and “pew pew pew”
3D
Why 3DMicrosoft’s continued commitment to enhancing Silverlight and serving the needs of .NET developersA top request from our customers (ranked 3rd on user voice)A leap forward in terms of visualizations, performance, and interactivityModern devices are 3D ready
Based on XNAFeatures to be split between runtime and SDK libraries
Runtime Requirements
WDDM Driver (Vista+) No user consent requiredXPDM Driver (XP+) User consent or elevated trust required
Shader Model 2.0 GPU
Target Applications
Data visualization*3D charts and reportsScatter pointsGeographic overlaysScience & astronomy
Education & trainingMarketing & advertising
Business*ManufacturingIndustrial processesHome designRealty & virtual toursCustomer support
MedicalGames & simulation
* Enterprise focus for Silverlight 5
demo
3D
Also Coming Post-Beta
P/Invoke64 bit SupportPivotViewerXAML VisualsTrick Play for Video/AudioLots of additional 3D features
Anti-aliasing, render target textures, more
Vector-based printingMore
What Next?
Silverlight 5 to ship by the end of the calendar yearSilverlight 5 beta available nowVisit http://silverlight.net
Download the bitsWatch the tutorial videosWalk through the tutorial postsReport any issues in the Silverlight 5 Feedback forum
Build awesome stuff!
My Books and Sessions
Join me at 2:30 at Digital Guru store here at Tech Ed for Silverlight 4 in Action book signingSilverlight 5 in Action coming later this year
Other sessions todayAdvanced Blend and MVVM for Developers
Thursday sessionsRepeat of this sessionMoving from Windows Forms to Silverlight and WPF
Web Track Resources
http://www.asp.net/http://www.silverlight.net/http://www.microsoft.com/web/gallery/http://www.iis.net/http://weblogs.asp.net/Scottgu/http://www.hanselman.com/blog/
Resources
www.microsoft.com/teched
Sessions On-Demand & Community Microsoft Certification & Training Resources
Resources for IT Professionals Resources for Developers
www.microsoft.com/learning
http://microsoft.com/technet http://microsoft.com/msdn
Learning
http://northamerica.msteched.com
Connect. Share. Discuss.
Complete an evaluation on CommNet and enter to win!
Scan the Tag to evaluate this session now on myTech•Ed Mobile
© 2011 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.