Silverlight 2 1/2

March 3rd, 2009 by jason Leave a reply »

There are some missing parts to Silverlight that really bother me.

  1. TemplateBinding – The TemplateBinding concept is a XAML tag only.  There is no backing class in the CLR.  Additionally, the TemplateBinding functionality does not support complex paths.
  2. Control Binding – There is no control binding is Silverlight.  Databinding works great, but I sure would like to be able to bind to a dependency object.
  3. ControlTemplate – You cannot programatically construct a ControlTemplate.  The ControlTemplate is both a XAML tag and a class, but there are no properties or methods in the class to provide a way to construct it in code.  This is yet another case of the XAML parser and the Core CLR doing some black magic.
  4. Timeline – The Timeline class is the base class for all of the built-in animations in Silverlight like Storyboard, ColorAnimation, DoubleAnimation, et al.  With a base class like this one would think one could inherit and implement a custom animation class.  Nope.  It looks like the actual functionality for these animations is hidden somewhere in the Core CLR, and these classes are just definitions of the animation.  To do custom animations one must use a game-loop.

These are all “black box” items to me.  Each one of these items bothers me because it presents Silverlight not as an extensible framework but as a simple API (well, not so simple).  As a long time .Net developer this really bothers me.

A couple of other things that bother me about Silverlight:

  1. Graphical elements do not have a “position changed” event.  Sometimes I want to know if an element has moved so I can do something about it.
  2. No right-mouse button support.  There are hacks to get around this but they don’t necessarily work across browser.
  3. Built-in drag-and-drop.  I just finished writing a custom control to allow drag-and-drop.  It was a lot of work and is not fully featured.

Point #2 from above is an inconvenience, but point #1 makes me take some radical approaches like polling or writing custom objects that do attempt to tell you when they have been moved.

With all of this hasle, Silverlight is a quantum-leap beyond HTML + CSS + Javascript.  It downloads and installs quickly.  It is very responsive.  The graphical things it can do are very awesome.  I just hope Microsoft address some of these points in the next release of Silverlight.

Advertisement

Leave a Reply

You must be logged in to post a comment.