SlideShare ist ein Scribd-Unternehmen logo
1 von 62
What’s New In Silverlight 5 Jeff Brand Developer and Platform Team Microsoft jbrand@microsoft.com | slickthought.net | @jabrand
Highlights ,[object Object]
HTML 5
Improved Graphics Acceleration
Speed Improvements
Mango
16 more languages
Nokia
Cut &Paste; Multi Tasking; Dev Tool Improvements
IE speed improvements (22 fps vs. 11 fps for Android and 2 fps for iPhone)
Silverlight 5
Beta Delivered
Rich Media
Hardware Video Decode
XNA for 3D Rendering
NUI & Windows Touch
Surface SDK 2 for Surface and Windows Touch Enables Devices
Tons of other topics!,[object Object]
What’s New in Silverlight 5
Agenda MVVM Databinding Enhancements Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit
Focused on your top asks: User Voice:
DataBinding Enhancements Enabling MVVM, but also just more productive
Layers Of Our Applications Presentation logic UI (XAML) UI (XAML) Orders UI (XAML) People Appointments Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Not reusable How to test? How to reuse? How can the designer update the UI How to provide different views Laptop/Desktop Tablet/Slate w/Touch Phone Models Services JSON RIA EF POCO XML REST Web Services Web Services WCF Vehicles Tax Person Vehicle Calendar People Schedules Shipping Orders Data SQL Server Oracle Telco Switches Media Streams
MVVM Test Framework Visual Studio Team Test Laptop/Desktop Appointments Tablet/Slate Appointments Phone Appointments Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Aggregation of data & services for your presentation logic Class Libraries ViewModel(VM.cs/vb Test API w/VSTT Leverage logic across UIs Designer parties on XAML Skin across varied form factors Laptop/Desktop Tablet/Slate w/Touch Phone Models Services JSON RIA EF POCO XML REST Web Services Web Services WCF Vehicles Tax Person Vehicle Calendar People Schedules Shipping Orders Data SQL Server Oracle Telco Switches Media Streams
Benefits of MVVM
MVVM Enhancements Silverlight 5  Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Reduce the need for UI code How to reduce code? Enhance DataBinding
MVVM Enhancements Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
Binding Style Setters How do I change styles without shipping new XAML? Can I set the styles in the database? demo
Binding Style Setters How It Works Create a Class to expose your values Instance the Class in your Resources Bind the value to the instanced resource namespaceMyProject.Styles {   publicclassMyAppStyles: INotifyPropertyChanged{ publicBrushForegroundColor{ get{ return _foregroundColor; } set { _foregroundColor = value; NotifyPropertyChanged("ForegroundColor"); <ResourceDictionary xmlns:stylesNS="clr-namespace:MyProject.Styles"> <stylesNS:MyAppStyles x:Key=“MyAppStyles"/> <StyleTargetType="TextBlock"> <Setter Property="Foreground" Value="{BindingForegroundColor}, Source={StaticResourceMyAppStyles}”
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSourceAncestor Bindings DatabindingDebugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
Implicit Data Templates <Application.Resources> <ResourceDictionary> <DataTemplatex:Key="vehiclesDataTemplate"> DataType="models:Vehicle"> <Image Source="Vehicle.png"/> </DataTemplate>     </ResourceDictionary> </Application.Resources> <Application.Resources> 	<ResourceDictionary> <DataTemplatex:Key="stateDataTemplate"> DataType=“models:State"> <Grid> <StackPanel Orientation="Horizontal"> <TextBlock Text="{BindingStateCode}"/> <TextBlock Text="{BindingStateName}"/> </StackPanel> </Grid> </DataTemplate> 	</ResourceDictionary> </Application.Resources> <Application.Resources> <ResourceDictionary> <!--Default Vehicle DataTemplate--> <DataTemplateDataType="models:Vehicle"> <Image Source="Vehicle.png"/> </DataTemplate> <DataTemplateDataType="models:Car"> <Image Source="Car.png"/> </DataTemplate> <DataTemplateDataType="models:Truck"> <Image Source="Truck.png"/> </DataTemplate> <DataTemplateDataType="models:Motorcycle"> <Image Source="Motorcycle.png"/> </DataTemplate> 	</ResourceDictionary> </Application.Resources> <Application.Resources> 	<ResourceDictionary> <DataTemplate x:Key=“StatesDataTemplate"> <Grid> <StackPanel Orientation="Horizontal"> <TextBlock Text="{BindingStateCode}"/> <TextBlock Text="{BindingStateName}"/> </StackPanel> </Grid> </DataTemplate> 	</ResourceDictionary> </Application.Resources> Template Based On Type Heterogeneous Collections With Inheritance Hierarchy  demo
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings DatabindingDebugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
Relative Source Ancestor BindingHow do I bind to data up the visual tree? namespaceSLInsurance.ViewModels{ publicclassAppointmentsViewModel{ publicObservableCollection<Appointments> Appointments{ get; set; }   publicObservableCollection<Status> Status{get; set; } namespaceSLInsurance.Views{ publicpartialclassAppointmentView: UserControl { ... this.DataContext= newViewModels.AppointmentViewModel(); <ListBoxItemsSource="{BindingPath=Appointments}"> <ListBox.ItemTemplate><DataTemplate><Grid ... 	<TextBlockText="{BindingTime}" … 	<ComboBoxItemsSource="{BindingDataContext.Status, RelativeSource={RelativeSourceFindAncestor AncestorType=UserControl, 		  Mode=FindAncestor}}"
Relative Source Ancestor Binding Used For Control Hierarchy Binding As Well <DataTemplate x:Key="StateComboBoxDataTemplate">   <StackPanel Orientation="Horizontal">     <TextBlock Text="{BindingStateCode}"Margin="0,0,5,0"/>     <TextBlock Text="{BindingStateName}" Visibility="{BindingIsDropDownOpen, RelativeSource={RelativeSourceFindAncestor AncestorType=ComboBox},                Converter={StaticResourceBoolToVisibilityConverter}}"/> </StackPanel> demo
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
DataBinding Debugging demo
DataBinding Debugging XAML Breakpoints Break when objects are bound, such as Grid Cycling ((System.Windows.Data.Debugging.BindingDebugState)BindingState).Error != null Locals:Dig into what’s working, what’s not Full Debugging Support Bound Instance & Type Values of the Final Source Pipeline ,[object Object]
AfterValue
AfterStringFormat
AfterTypeConversion
…,[object Object]
Custom Markup Extensions demo
Custom Markup Extensions How do I get my event handler code out of my Code Behind <ListBoxx:Name="appointmentsListbox" ItemsSource="{Binding Appointments}" SelectionChanged="OnAppointmentsListbox_SelectionChanged"> UI (XAML) publicpartialclassAppointments: UserControl{ privatevoidOnAppointmentsListbox_SelectionChanged(object sender, SelectionChangedEventArgs e){ this.DataService.GetClaimById(GetClaimsCallback, ((AdjusterAppointment) (this.appointmentsListbox.SelectedItem)).Claim_Id); 	} privatevoidGetClaimsCallback(ObservableCollection<Claim> claims) { this.AppoinmentsListBox.Items.Add(claims[0]); Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb Services Models publicvoidGetClaimById(Action<ObservableCollection<Claim>> callback, stringclaim_Id) { varquery = DataContext.GetClaimByIdQuery(claim_Id); 	_getClaimCallback = callback; 	_claimLoadOperation = DataContext.Load<Claim>(query); 	… Data
Custom Markup ExtensionHow It Works publicclassMethodInvokeExtension: IMarkupExtension<object> { 	// Properties Exposed in XAML as Intellisense Love publicStringMethod{ get; set; } 	// Invoked by the XAML Parser @ runtime 	publicobjectProvideValue(IServiceProviderserviceProvider) { <UserControl x:Class=“AppointmentsView" xmlns:MyUtils="clr-namespace:SLInsurance;assembly=SLInsurance"> ... <StackPanel x:Name="LayoutRoot">   <ComboBoxName=“appointmentsListBox" SelectionChanged="{MyUtils:MethodInvoke Method=OnAppointmentChanged}"
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
DataContextChanged Event It just works Increase Memory Efficiency “handle references” this.DataContextChanged += View_DataContextChanged; … voidView_DataContextChanged(objectsender, DependencyPropertyChangedEventArgs e) { INotifyPropertyChanged customer;     customer = e.OldValueasINotifyPropertyChanged; if (customer != null) customer.PropertyChanged -= customer_PropertyChanged;     customer = e.NewValueasINotifyPropertyChanged; if (customer != null) customer.PropertyChanged += customer_PropertyChanged; }
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
UpdateSourceTriggerHow can I get key stroke changes? <TextBoxName="vinTextBox" Text="{BindingSelectedClaim.InsuredVIN, Mode=TwoWay}" TextChanged="vinTextBox_TextChanged" UI (XAML) privatevoidvinTextBox_TextChanged(object sender, TextChangedEventArgs e) { Helpers.VinCarInfocarInfo = Helpers.VINParser.Parse(vinTextBox.Text); this.vehicleYearsAutoComplete.Text = carInfo.Year.Value.ToString(); this.vehicleMakeAutoComplete.Text = carInfo.Make; this.vehicleModelComboBox.SelectedValue = carInfo.Model; Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb publicvoidLoadVehicleYears() { this.DataService.GetVehicleYears(GetVehicleYearsCallback); } publicvoidLoadVehicleMakes(Nullable<int> year) { if(year.HasValue) { this.DataService.GetVehicleMakes(GetVehicleMakessCallback, year.Value); … publicvoidLoadVehicleModels(Nullable<int> year, string make) { if(year.HasValue) { this.DataService.GetVehicleModels(GetVehicleModelssCallback, year.Value, make); Services Models publicvoidGetVehicleMakes(Action<ObservableCollection<string>> callback, int year) {             _getVehicleMakesCallback = callback; this.SearchServiceClient.GetVehicleMakesCompleted += OnGetVehicleMakesCompleted; this.SearchServiceClient.GetVehicleMakesAsync(year); } Data
UpdateSourceTrigger Moving code from the UI to the testable ViewModel <TextBoxName="vinTextBox" Text="{BindingSelectedClaim.InsuredVIN, Mode=TwoWay}" UpdateSourceTrigger=PropertyChanged}" UI (XAML) Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb voidOnClaimPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { switch(e.PropertyName) { case"InsuredVIN": ParseVIN(); break; … private voidParseVIN() { Helpers.VinCarInfocarInfo = Helpers.VINParser.Parse(this.SelectedClaim.InsuredVIN); this.SelectedClaim.InsuredYear= carInfo.Year; this.SelectedClaim.InsuredMake= carInfo.Make; this.SelectedClaim.InsuredModel= carInfo.Model; … Services Models Data
UpdateSourceTrigger demo
MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
WCF RIA Services for Silverlight 5 Complex Types (SP1) Custom Client Code Gen(SP1) EF Code First (coming soon) DateTimeOffset MVVM Support
But Wait, There’s More Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Text Printing Media
Text Enhancements Cum sociisnatoquepenatibus et magnis dis parturient montes, nasceturridiculus mus. Pellentesque habitant morbitristiquesenectus et netus et malesuada fames ac turpisegestas. Vivamusenim dolor, molestie at auctor id, auctorultrices nisi. Curabitururnalorem, luctushendreritdapibusquis, facilisissedorci. Aliquamnuncmassa, placerat id pretiumeget, luctus sit amet diam. Vestibulum ante ipsumprimis in faucibusorciluctus et ultricesposuerecubiliaCurae; Pellentesquefermentumneque at nislbibendumcursus. Aliquamsollicitudineliteununcplacerat et pulvinarmauriscondimentum. Donecsedsapienelit, velcondimentumjusto. Cum sociisnatoquepenatibus et magnis dis parturient montes, nasceturridiculus mus. Ututodionunc. Maecenas vitae quam urna. Nulla a ante imperdietsemtinciduntporta. Donecesttellus, imperdietegetullamcorpereu, laoreetvellorem. Fusceornarenisl Linked Text Containers Flow Rich Text from one container to another Dynamically flows on resize mollis lacus cursus semper suscipiturnaultricies. Phasellus magna justo, commodosodalesauctornec, euismod vitae purus. Vivamusdignissimfeugiattristique. Crasaliquetsapien non justosagittisimperdiet. In a velitmauris, eusodales magna. Fuscelectuslectus, blandit non semper vitae, cursusutpurus. Vestibulumquisaliquamaugue. Morbiid estseddiamimperdietpretium vitae a turpis. Sedvelsapienarcu. Loremipsum dolor sit amet, consecteturadipiscingelit. Suspendisse ac diamut ante imperdietlacinia. Integer sit ametjusto sit amettortor facilisis id sit ametaugue. Etiam in risusveleratmolestieviverra. Suspendissepellentesquebibendumsagittis. Etiamconvallisleo at dui ornareegetelementumodio dictum. Integer tempus ultricieslectus. Maecenas dictum ipsum id nisladipiscingeuiaculistortorsuscipit. Etiamsedsapienneque, in ultricies magna. Aliquam in nisl et lectusbibendumvestibulum. Donecsuscipit, velit vitae convallisaccumsan, tortor magna dignissimpurus, sedconvallisorcitortorsed sem. Crasquisest id turpiscongueporta. Proinpharetramattisnullaquisvestibulum. <RichTextBox OverflowContentTarget="{Binding ElementName=overflow1}"> <RichTextBoxOverflow x:Name="overflow1"OverflowContentTarget="{BindingElementName=overflow2}"> <RichTextBoxOverflow x:Name="overflow2"OverflowContentTarget="{BindingElementName=overflow3}"> ... Utin sapien id maurisegestasrhoncus a egeterat. Vivamustempor tempus quam facilisisdapibus. Curabiturvolutpatipsum vitae tortortinciduntsedmalesuadaurnatincidunt. Quisqueporttitor, neque id malesuadafaucibus, quam leoauctornisl, quisaliquetenim ligula utodio. Etiamvelturpis magna. Crasiaculisest sem. Pellentesquemalesuada, liberoeutemportempor, tellusipsumdignissimsapien, id facilisisaugueipsum vitae quam. Crasquisimperdietleo. In orcipurus, placerat ac ultricies in, elementum vitae turpis. Nunclectussapien, sagittis id luctusut, hendreritutmassa. Sedpurussapien, pharetra id faucibusnec, semper id lacus. Phasellus et lectusleo, eget adipiscinglorem. Donecfermentum lacus dolor. Etiamlaoreettristique nisi, sit ametconvallisnunclacinia et. Integer aliquam, magna ac porttitorcongue, estliberoconsectetur lacus, lobortisportaorcirisusnec magna. Integer sapienpurus, volutpat sit ametvehicula vitae, accumsan a felis. Sed a nullavelenimlaoreetconsequat. Nullautnequemassa, at semper enim. risusnec magna. Integer sapienpurus, volutpat sit ametvehicula vitae, accumsan a felis. Sed a nullavelenimlaoreetconsequat. Nullautnequemassa, at semper enim.
Text Clarity Sharpens text by snapping with pixels Great for low res devices
Bitmap Vector Vector Printing

Weitere ähnliche Inhalte

Was ist angesagt?

Csphtp1 20
Csphtp1 20Csphtp1 20
Csphtp1 20HUST
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersKathy Brown
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyonddynamis
 
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...GoogleTecTalks
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Paxcel Technologies
 
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSWeb Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSRSolutions
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtmlsagaroceanic11
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overviewukdpe
 
HTML5: a quick overview
HTML5: a quick overviewHTML5: a quick overview
HTML5: a quick overviewMark Whitaker
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
Net course content
Net course contentNet course content
Net course contentmindq
 
Thug: a new low-interaction honeyclient
Thug: a new low-interaction honeyclientThug: a new low-interaction honeyclient
Thug: a new low-interaction honeyclientAngelo Dell'Aera
 
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationHTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationTodd Anglin
 
Learning to run
Learning to runLearning to run
Learning to rundominion
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookRakesh Kumar Jha
 
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...George McGeachie
 

Was ist angesagt? (20)

Csphtp1 20
Csphtp1 20Csphtp1 20
Csphtp1 20
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client Developers
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyond
 
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...
A World Beyond Ajax Accessing Googles Ap Is From Flash And Non Java Script En...
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSWeb Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
 
API
APIAPI
API
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
 
Jquery
JqueryJquery
Jquery
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
HTML5
HTML5HTML5
HTML5
 
HTML5: a quick overview
HTML5: a quick overviewHTML5: a quick overview
HTML5: a quick overview
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Net course content
Net course contentNet course content
Net course content
 
Thug: a new low-interaction honeyclient
Thug: a new low-interaction honeyclientThug: a new low-interaction honeyclient
Thug: a new low-interaction honeyclient
 
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationHTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
 
Learning to run
Learning to runLearning to run
Learning to run
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API Notebook
 
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...
SAP PowerDesigner Masterclass for the UK SAP Database & Technology User Group...
 
Gwt 2,3 Deep dive
Gwt 2,3 Deep diveGwt 2,3 Deep dive
Gwt 2,3 Deep dive
 

Andere mochten auch

Conventions of a music video
Conventions of a music videoConventions of a music video
Conventions of a music videosrallison
 
Social media trends
Social media trendsSocial media trends
Social media trendsVreni Bean
 
What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"mdc11
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Enginemdc11
 
Music Theory
Music TheoryMusic Theory
Music Theorysrallison
 
MVVM Light Toolkit Works Great, Less Complicated
MVVM Light ToolkitWorks Great, Less ComplicatedMVVM Light ToolkitWorks Great, Less Complicated
MVVM Light Toolkit Works Great, Less Complicatedmdc11
 

Andere mochten auch (7)

Conventions of a music video
Conventions of a music videoConventions of a music video
Conventions of a music video
 
Social media trends
Social media trendsSocial media trends
Social media trends
 
What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"
 
2014 entry electrical engineering
2014 entry electrical engineering2014 entry electrical engineering
2014 entry electrical engineering
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Music Theory
Music TheoryMusic Theory
Music Theory
 
MVVM Light Toolkit Works Great, Less Complicated
MVVM Light ToolkitWorks Great, Less ComplicatedMVVM Light ToolkitWorks Great, Less Complicated
MVVM Light Toolkit Works Great, Less Complicated
 

Ähnlich wie Silverlight 5 whats new overview

Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedDave Bost
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightClint Edmonson
 
Building Data Centric Apps in WPF
Building Data Centric Apps in WPFBuilding Data Centric Apps in WPF
Building Data Centric Apps in WPFFrank La Vigne
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Modelibra Software Family
Modelibra Software FamilyModelibra Software Family
Modelibra Software Familydzenanr
 
Net Framework Hima
Net Framework HimaNet Framework Hima
Net Framework HimaHimaVejella
 
Letsleads dot net-syllabus
Letsleads dot net-syllabusLetsleads dot net-syllabus
Letsleads dot net-syllabusletsleads
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP DevelopersWes Yanaga
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Sparkhound Inc.
 

Ähnlich wie Silverlight 5 whats new overview (20)

Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Practical OData
Practical ODataPractical OData
Practical OData
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Industrial training in .net
Industrial training in .netIndustrial training in .net
Industrial training in .net
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
Dot net training bangalore
Dot net training bangaloreDot net training bangalore
Dot net training bangalore
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Building Data Centric Apps in WPF
Building Data Centric Apps in WPFBuilding Data Centric Apps in WPF
Building Data Centric Apps in WPF
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Modelibra Software Family
Modelibra Software FamilyModelibra Software Family
Modelibra Software Family
 
Net Framework Hima
Net Framework HimaNet Framework Hima
Net Framework Hima
 
php
phpphp
php
 
Letsleads dot net-syllabus
Letsleads dot net-syllabusLetsleads dot net-syllabus
Letsleads dot net-syllabus
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP Developers
 
MSDN Dec2007
MSDN Dec2007MSDN Dec2007
MSDN Dec2007
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Silverlight 5 whats new overview

  • 1. What’s New In Silverlight 5 Jeff Brand Developer and Platform Team Microsoft jbrand@microsoft.com | slickthought.net | @jabrand
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 12. Mango
  • 14. Nokia
  • 15. Cut &Paste; Multi Tasking; Dev Tool Improvements
  • 16. IE speed improvements (22 fps vs. 11 fps for Android and 2 fps for iPhone)
  • 21. XNA for 3D Rendering
  • 23. Surface SDK 2 for Surface and Windows Touch Enables Devices
  • 24.
  • 25. What’s New in Silverlight 5
  • 26. Agenda MVVM Databinding Enhancements Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit
  • 27. Focused on your top asks: User Voice:
  • 28. DataBinding Enhancements Enabling MVVM, but also just more productive
  • 29. Layers Of Our Applications Presentation logic UI (XAML) UI (XAML) Orders UI (XAML) People Appointments Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Not reusable How to test? How to reuse? How can the designer update the UI How to provide different views Laptop/Desktop Tablet/Slate w/Touch Phone Models Services JSON RIA EF POCO XML REST Web Services Web Services WCF Vehicles Tax Person Vehicle Calendar People Schedules Shipping Orders Data SQL Server Oracle Telco Switches Media Streams
  • 30. MVVM Test Framework Visual Studio Team Test Laptop/Desktop Appointments Tablet/Slate Appointments Phone Appointments Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Code Behind (XAML.cs/vb) Aggregation of data & services for your presentation logic Class Libraries ViewModel(VM.cs/vb Test API w/VSTT Leverage logic across UIs Designer parties on XAML Skin across varied form factors Laptop/Desktop Tablet/Slate w/Touch Phone Models Services JSON RIA EF POCO XML REST Web Services Web Services WCF Vehicles Tax Person Vehicle Calendar People Schedules Shipping Orders Data SQL Server Oracle Telco Switches Media Streams
  • 32. MVVM Enhancements Silverlight 5 Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Reduce the need for UI code How to reduce code? Enhance DataBinding
  • 33. MVVM Enhancements Binding In Style Setters ImplicitDataTemplates RelativeSource Ancestor Bindings Custom Markup Extensions Databinding Debugging DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 34. Binding Style Setters How do I change styles without shipping new XAML? Can I set the styles in the database? demo
  • 35. Binding Style Setters How It Works Create a Class to expose your values Instance the Class in your Resources Bind the value to the instanced resource namespaceMyProject.Styles { publicclassMyAppStyles: INotifyPropertyChanged{ publicBrushForegroundColor{ get{ return _foregroundColor; } set { _foregroundColor = value; NotifyPropertyChanged("ForegroundColor"); <ResourceDictionary xmlns:stylesNS="clr-namespace:MyProject.Styles"> <stylesNS:MyAppStyles x:Key=“MyAppStyles"/> <StyleTargetType="TextBlock"> <Setter Property="Foreground" Value="{BindingForegroundColor}, Source={StaticResourceMyAppStyles}”
  • 36. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSourceAncestor Bindings DatabindingDebugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 37. Implicit Data Templates <Application.Resources> <ResourceDictionary> <DataTemplatex:Key="vehiclesDataTemplate"> DataType="models:Vehicle"> <Image Source="Vehicle.png"/> </DataTemplate> </ResourceDictionary> </Application.Resources> <Application.Resources> <ResourceDictionary> <DataTemplatex:Key="stateDataTemplate"> DataType=“models:State"> <Grid> <StackPanel Orientation="Horizontal"> <TextBlock Text="{BindingStateCode}"/> <TextBlock Text="{BindingStateName}"/> </StackPanel> </Grid> </DataTemplate> </ResourceDictionary> </Application.Resources> <Application.Resources> <ResourceDictionary> <!--Default Vehicle DataTemplate--> <DataTemplateDataType="models:Vehicle"> <Image Source="Vehicle.png"/> </DataTemplate> <DataTemplateDataType="models:Car"> <Image Source="Car.png"/> </DataTemplate> <DataTemplateDataType="models:Truck"> <Image Source="Truck.png"/> </DataTemplate> <DataTemplateDataType="models:Motorcycle"> <Image Source="Motorcycle.png"/> </DataTemplate> </ResourceDictionary> </Application.Resources> <Application.Resources> <ResourceDictionary> <DataTemplate x:Key=“StatesDataTemplate"> <Grid> <StackPanel Orientation="Horizontal"> <TextBlock Text="{BindingStateCode}"/> <TextBlock Text="{BindingStateName}"/> </StackPanel> </Grid> </DataTemplate> </ResourceDictionary> </Application.Resources> Template Based On Type Heterogeneous Collections With Inheritance Hierarchy demo
  • 38. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings DatabindingDebugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 39. Relative Source Ancestor BindingHow do I bind to data up the visual tree? namespaceSLInsurance.ViewModels{ publicclassAppointmentsViewModel{ publicObservableCollection<Appointments> Appointments{ get; set; } publicObservableCollection<Status> Status{get; set; } namespaceSLInsurance.Views{ publicpartialclassAppointmentView: UserControl { ... this.DataContext= newViewModels.AppointmentViewModel(); <ListBoxItemsSource="{BindingPath=Appointments}"> <ListBox.ItemTemplate><DataTemplate><Grid ... <TextBlockText="{BindingTime}" … <ComboBoxItemsSource="{BindingDataContext.Status, RelativeSource={RelativeSourceFindAncestor AncestorType=UserControl, Mode=FindAncestor}}"
  • 40. Relative Source Ancestor Binding Used For Control Hierarchy Binding As Well <DataTemplate x:Key="StateComboBoxDataTemplate"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{BindingStateCode}"Margin="0,0,5,0"/> <TextBlock Text="{BindingStateName}" Visibility="{BindingIsDropDownOpen, RelativeSource={RelativeSourceFindAncestor AncestorType=ComboBox}, Converter={StaticResourceBoolToVisibilityConverter}}"/> </StackPanel> demo
  • 41. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 43.
  • 47.
  • 49. Custom Markup Extensions How do I get my event handler code out of my Code Behind <ListBoxx:Name="appointmentsListbox" ItemsSource="{Binding Appointments}" SelectionChanged="OnAppointmentsListbox_SelectionChanged"> UI (XAML) publicpartialclassAppointments: UserControl{ privatevoidOnAppointmentsListbox_SelectionChanged(object sender, SelectionChangedEventArgs e){ this.DataService.GetClaimById(GetClaimsCallback, ((AdjusterAppointment) (this.appointmentsListbox.SelectedItem)).Claim_Id); } privatevoidGetClaimsCallback(ObservableCollection<Claim> claims) { this.AppoinmentsListBox.Items.Add(claims[0]); Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb Services Models publicvoidGetClaimById(Action<ObservableCollection<Claim>> callback, stringclaim_Id) { varquery = DataContext.GetClaimByIdQuery(claim_Id); _getClaimCallback = callback; _claimLoadOperation = DataContext.Load<Claim>(query); … Data
  • 50. Custom Markup ExtensionHow It Works publicclassMethodInvokeExtension: IMarkupExtension<object> { // Properties Exposed in XAML as Intellisense Love publicStringMethod{ get; set; } // Invoked by the XAML Parser @ runtime publicobjectProvideValue(IServiceProviderserviceProvider) { <UserControl x:Class=“AppointmentsView" xmlns:MyUtils="clr-namespace:SLInsurance;assembly=SLInsurance"> ... <StackPanel x:Name="LayoutRoot"> <ComboBoxName=“appointmentsListBox" SelectionChanged="{MyUtils:MethodInvoke Method=OnAppointmentChanged}"
  • 51. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 52. DataContextChanged Event It just works Increase Memory Efficiency “handle references” this.DataContextChanged += View_DataContextChanged; … voidView_DataContextChanged(objectsender, DependencyPropertyChangedEventArgs e) { INotifyPropertyChanged customer; customer = e.OldValueasINotifyPropertyChanged; if (customer != null) customer.PropertyChanged -= customer_PropertyChanged; customer = e.NewValueasINotifyPropertyChanged; if (customer != null) customer.PropertyChanged += customer_PropertyChanged; }
  • 53. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChanged Event UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 54. UpdateSourceTriggerHow can I get key stroke changes? <TextBoxName="vinTextBox" Text="{BindingSelectedClaim.InsuredVIN, Mode=TwoWay}" TextChanged="vinTextBox_TextChanged" UI (XAML) privatevoidvinTextBox_TextChanged(object sender, TextChangedEventArgs e) { Helpers.VinCarInfocarInfo = Helpers.VINParser.Parse(vinTextBox.Text); this.vehicleYearsAutoComplete.Text = carInfo.Year.Value.ToString(); this.vehicleMakeAutoComplete.Text = carInfo.Make; this.vehicleModelComboBox.SelectedValue = carInfo.Model; Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb publicvoidLoadVehicleYears() { this.DataService.GetVehicleYears(GetVehicleYearsCallback); } publicvoidLoadVehicleMakes(Nullable<int> year) { if(year.HasValue) { this.DataService.GetVehicleMakes(GetVehicleMakessCallback, year.Value); … publicvoidLoadVehicleModels(Nullable<int> year, string make) { if(year.HasValue) { this.DataService.GetVehicleModels(GetVehicleModelssCallback, year.Value, make); Services Models publicvoidGetVehicleMakes(Action<ObservableCollection<string>> callback, int year) { _getVehicleMakesCallback = callback; this.SearchServiceClient.GetVehicleMakesCompleted += OnGetVehicleMakesCompleted; this.SearchServiceClient.GetVehicleMakesAsync(year); } Data
  • 55. UpdateSourceTrigger Moving code from the UI to the testable ViewModel <TextBoxName="vinTextBox" Text="{BindingSelectedClaim.InsuredVIN, Mode=TwoWay}" UpdateSourceTrigger=PropertyChanged}" UI (XAML) Code Behind (XAML.cs/vb) ViewModel(VM.cs/vb voidOnClaimPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { switch(e.PropertyName) { case"InsuredVIN": ParseVIN(); break; … private voidParseVIN() { Helpers.VinCarInfocarInfo = Helpers.VINParser.Parse(this.SelectedClaim.InsuredVIN); this.SelectedClaim.InsuredYear= carInfo.Year; this.SelectedClaim.InsuredMake= carInfo.Make; this.SelectedClaim.InsuredModel= carInfo.Model; … Services Models Data
  • 57. MVVM Enhancements Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media
  • 58. WCF RIA Services for Silverlight 5 Complex Types (SP1) Custom Client Code Gen(SP1) EF Code First (coming soon) DateTimeOffset MVVM Support
  • 59. But Wait, There’s More Binding In Style Setters Implicit DataTemplates RelativeSource Ancestor Bindings Databinding Debugging Custom Markup Extensions DataContextChangedEvent UpdateSourceTrigger WCF RIA Services Enhancements Text, Printing & Media Text Printing Media
  • 60. Text Enhancements Cum sociisnatoquepenatibus et magnis dis parturient montes, nasceturridiculus mus. Pellentesque habitant morbitristiquesenectus et netus et malesuada fames ac turpisegestas. Vivamusenim dolor, molestie at auctor id, auctorultrices nisi. Curabitururnalorem, luctushendreritdapibusquis, facilisissedorci. Aliquamnuncmassa, placerat id pretiumeget, luctus sit amet diam. Vestibulum ante ipsumprimis in faucibusorciluctus et ultricesposuerecubiliaCurae; Pellentesquefermentumneque at nislbibendumcursus. Aliquamsollicitudineliteununcplacerat et pulvinarmauriscondimentum. Donecsedsapienelit, velcondimentumjusto. Cum sociisnatoquepenatibus et magnis dis parturient montes, nasceturridiculus mus. Ututodionunc. Maecenas vitae quam urna. Nulla a ante imperdietsemtinciduntporta. Donecesttellus, imperdietegetullamcorpereu, laoreetvellorem. Fusceornarenisl Linked Text Containers Flow Rich Text from one container to another Dynamically flows on resize mollis lacus cursus semper suscipiturnaultricies. Phasellus magna justo, commodosodalesauctornec, euismod vitae purus. Vivamusdignissimfeugiattristique. Crasaliquetsapien non justosagittisimperdiet. In a velitmauris, eusodales magna. Fuscelectuslectus, blandit non semper vitae, cursusutpurus. Vestibulumquisaliquamaugue. Morbiid estseddiamimperdietpretium vitae a turpis. Sedvelsapienarcu. Loremipsum dolor sit amet, consecteturadipiscingelit. Suspendisse ac diamut ante imperdietlacinia. Integer sit ametjusto sit amettortor facilisis id sit ametaugue. Etiam in risusveleratmolestieviverra. Suspendissepellentesquebibendumsagittis. Etiamconvallisleo at dui ornareegetelementumodio dictum. Integer tempus ultricieslectus. Maecenas dictum ipsum id nisladipiscingeuiaculistortorsuscipit. Etiamsedsapienneque, in ultricies magna. Aliquam in nisl et lectusbibendumvestibulum. Donecsuscipit, velit vitae convallisaccumsan, tortor magna dignissimpurus, sedconvallisorcitortorsed sem. Crasquisest id turpiscongueporta. Proinpharetramattisnullaquisvestibulum. <RichTextBox OverflowContentTarget="{Binding ElementName=overflow1}"> <RichTextBoxOverflow x:Name="overflow1"OverflowContentTarget="{BindingElementName=overflow2}"> <RichTextBoxOverflow x:Name="overflow2"OverflowContentTarget="{BindingElementName=overflow3}"> ... Utin sapien id maurisegestasrhoncus a egeterat. Vivamustempor tempus quam facilisisdapibus. Curabiturvolutpatipsum vitae tortortinciduntsedmalesuadaurnatincidunt. Quisqueporttitor, neque id malesuadafaucibus, quam leoauctornisl, quisaliquetenim ligula utodio. Etiamvelturpis magna. Crasiaculisest sem. Pellentesquemalesuada, liberoeutemportempor, tellusipsumdignissimsapien, id facilisisaugueipsum vitae quam. Crasquisimperdietleo. In orcipurus, placerat ac ultricies in, elementum vitae turpis. Nunclectussapien, sagittis id luctusut, hendreritutmassa. Sedpurussapien, pharetra id faucibusnec, semper id lacus. Phasellus et lectusleo, eget adipiscinglorem. Donecfermentum lacus dolor. Etiamlaoreettristique nisi, sit ametconvallisnunclacinia et. Integer aliquam, magna ac porttitorcongue, estliberoconsectetur lacus, lobortisportaorcirisusnec magna. Integer sapienpurus, volutpat sit ametvehicula vitae, accumsan a felis. Sed a nullavelenimlaoreetconsequat. Nullautnequemassa, at semper enim. risusnec magna. Integer sapienpurus, volutpat sit ametvehicula vitae, accumsan a felis. Sed a nullavelenimlaoreetconsequat. Nullautnequemassa, at semper enim.
  • 61. Text Clarity Sharpens text by snapping with pixels Great for low res devices
  • 63. Trick PlayWhere did they joke about… Speed through videos, search for sounds New dimension to search No “Alvin & The Chipmunks”
  • 64. Unrestricted File Access SL5 trusted apps can access: SL4 trusted apps can access:
  • 66. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit PivotViewer
  • 67. Trusted Apps SL4: OOB apps run trusted with user consent SL5: in-browser trusted apps with admin consent Set permissions via group policy No prompts or installs Familiar navigation model Can be part of a larger HTML site
  • 69. Creating a Trusted App Just like SL4 trusted OOB <OutOfBrowserSettings> <OutOfBrowserSettings.SecuritySettings> <SecuritySettingsElevatedPermissions="Required" /> </OutOfBrowserSettings.SecuritySettings> </OutOfBrowserSettings>
  • 70. Creating a Trusted App Sign the .xap Same as for a trusted OOB In Visual Studio or on command line signtool.exe sign /v /f nameOfCert.pfx /p "<password>" nameOfApp.xap or
  • 71. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit PivotViewer
  • 72. Permissions in Group Policy Actually, only one permission – trusted or not Network admin specifies which publishers are trusted Publishers identified by Authenticode certificate Put certificate in client machine’s trusted publisher store Same as ClickOnce Xaps are associated with publishers by Authenticode
  • 73. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit PivotViewer
  • 74. P/Invoke P/Invoke lets you call native code COM (SL4) also lets you call native code Anything you can do with COM can also be done with P/Invoke Strongly typed No COM registration P/Invoke is optimized for Win32 APIs & native C/C++ code COM is optimized for COM Automation APIs, eg Office COM & P/Invoke are available on Windows to trusted apps
  • 75. P/Invoke Works exactly like it does in .NET Framework [DllImport("kernel32.dll")] staticexternintGetDriveType(stringlpRootPathName); … int type = GetDriveType(drive);
  • 76. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit PivotViewer
  • 77. Configure SL5 WebBrowser In-Browser Configure app to run as out-of-browser trusted app even though it will be in-browser Configure target computers to allows trusted app in browser: Key path for 32-bit computers: HKEY_LOCAL_MACHINEoftwareicrosoftilverlightbr />Key path for 64-bit computers: HKEY_LOCAL_MACHINEoftwareow6432Nodeicrosoftilverlightbr />Value name: AllowElevatedTrustAppsInBrowser Value type: DWORD Valid Values: Disabled - 0x00000000 Enabled - 0x00000001
  • 78. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit Lots of 3D Stuff
  • 79. Multiple Windows System.Windows.Window is now an instantiable class Windoww = newWindow(); w.Height = 400; w.Width = 600; w.Content = new MyUserControl(); w.Visibility = Visibility.Visible;
  • 81. Agenda Unrestricted File Access Trusted Apps In-Browser Group Policy P/Invoke HTML support Multiple Windows 64-bit PivotViewer
  • 82. 64-bit Support 64-bit machines & apps are becoming increasingly common SL5 can run in a 64-bit process 64-bit browsers Sidebar on 64-bit Windows Why 64-bit is interesting: Because you don’t get to choose the browser Because you’re native hosting in a 64-bit process Because you need a lot of address space
  • 83. 3D Target applications Data visualization* 3D charts and reports Scatter points Geographic overlays Science & astronomy Education & training Marketing & advertising Business* Manufacturing Industrial processes Home design Realty & virtual tours Customer support Medical Games & simulation * Enterprise focus for Silverlight 5
  • 85. Silverlight 5 Summary Adding productivity & robustness with Advanced styling and templating Databinding Enhancements & Debugging Better Text & Printing Improved trusted and native interop Enabling Next Gen Media Silverlight 5 ships second half 2011
  • 86. Resources Silverlight.net WCF RIA Services Page: http://silverlight.net/riaservices
  • 87. © 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.

Hinweis der Redaktion

  1. Separation patternSeparates Design/Presentation from Business LogicData binding (XAML)Unit testingSeparation of concernsDesigner and developer symbiosisConsistent patternMaintainable Scalable
  2. Add:StringFormatFallBackValueTargetNullValueShow PipelineAdd ConverterShow the converterBreakpoint in the converterLastCompletedStageCan’t step into the different binding stagesCould I set the breakpoint conditional stage to the binding stage?
  3. Get w/Mark Harper on various use cases - Try demoing another scenarioHelpers.InvokeExtension
  4. Early head start with SP1
  5. Chinese