Next week I will be in Vancouver and talk at the local User Group: the Vancouver Silverlight User Group.
HTML5 and Silverlight 5: facts, assumptions and near future
In this session, I will try to clarify what we hear (and not hear) around these technologies, maybe add a few guess on their role in Windows 8... as well as presenting a technical comparison between HTML5 and Silverlight 5: HTML vs XAML, tools, languages, databinding, performance, etc.
Wednesday, July 6, 2011
Thanks Telerik to sponsor the room for this event.
More details and registration:
[cross posted on the MSDN Canadian developers blog]
One cool new feature of Silverlight 5 is Implicit Data Template. You use Data Templates in Silverlight to control the way you display data while doing DataBinding. Until now DataTemplates were defined inside a control or linked to a resource with a key.
Implicit DataTemplate allows templates to be automatically applied to databound items based on their types (this feature already exists in WPF, so we see more convergence here). This is very useful when you have a list that contains objects of different types, and you want a different layout for each type.
I created a quick sample based on this model:
SocialItem is the base class for multiple *Item derived class.
I can bind a ListBox to a list containing items of type SocialItem, the list can contain any of SocialItem’s derived classes: TwitterItem, FacebookItem, etc…
Using Implicit Data Templates allows me to go…
1. From this (Silverlight 4):
2. To this (Silverlight 5):
This is accomplished by (automatically) applying different XAML templates depending on the object’s type.
1. Silverlight 4
In the past you would apply a single DataTemplate with a key in Resource to all items in the ListBox:
2. Silverlight 5
Now, all DataTemplates are defined in Resource with a DataType attribute set to the target type instead of a key:
Note the ListBox does not need to reference any template.
Now if you move your DataTemplates to a ResourceDictionary, any time an object appears in a view it will pickup the correct template, that’s cool!
Also note that Implicit Data Templates are polymorphic, so you can define a template for a base class, and redefine if for a derived class.
Download my code sample (Silverlight 5 beta)
Earlier this month I did a talk on Visual Studio LightSwitch at the DevTeach conference in Montreal.
Here is the list of features I demonstrated:
- Designer to create the Db tables
- Wizards to create the UI (automatic screens layout)
- Live screen layout customization
- Built-in insert/edit/delete with validation
- Built-in sort, pagination and Excel export
- Custom validation
- Computed columns
- Customize a Search screen with a DatePicker as filter parameter
- Customize the Menu (groups)
- Using an Extension (Bing Map)
- Users, Roles and Permissions
- Screens Access control
Associated Code (LightSwitch beta 2)
Associated Slides (french)
Download LightSwitch Beta 2
Download the LightSwitch Training Kit
How to deploy your LightSwitch app to Azure?
How do I videos ?
This week I did the Silverlight 5 part of the DevTeach Keynote in Montreal and really enjoyed it!
I did a “Top 3 Silverlight 5 new features” presentation in 15 min. (it was not really my TOP3, but the 3 features the most “demoable”…):
- Implicit Data Template
- Trusted Applications in Browser (I showed WebBrowser control and Notifications in browser)
- Multiple Native Windows (on Trusted OOB app)
- (bonus) DataBinding Debugging!
I also quickly showed the new RelativeSource AncestorType binding syntax.