I’ve been putting myself through a crash course on SilverlightWPF these last few days and here are a few random thoughts. All of this is after a 60 minute breakneck tour of WPFSilverlight so I’m more than likely missing a whole bunch of things and probably doing things bass-ackwards but hey, that’s why they call it learning.
- There are three stock layout managers (used for placing controls): Canvas, Stack & Grid. Where is the CSS-style panel? If designing web pages has taught us anything it’s that the grid quickly gets cumbersome. Note to self if I get hired at Microsoft: Create a CSSLayoutPanel that uses stock CSS to position the controls.
- I forgot how painful an experience it is to enter XML in Visual Studio. I’ve been spoiled by Intype and E TextEditor where you don’t need to enter the opening angle bracket to get code completion. Also, I must be doing something wrong because entering XML attributes is downright painful in Visual Studio. This is where I’m stuck:
- Type “<ColumnDefinition ”
- Type “W”, brings up Intellisense
- Tab to complete, you now have Width=””
- Type “50″
- Now what? How do I get beyond the ending quote without a lot of keyboard gymnastics? I can press Right Arrow or End but they’re not quickly reachable from the home row. I can just type another quote but instead that’ll just add a second ending quote which isn’t what we want. What should really happen is that I should be able to press Tab to tab out of quotes and put the caret one space past the ending quote. This is how TextMate, Intype and E all handle this and it works wonderfully.
- There needs to be a nice bundle of XAML specific code-snippets. The argument that all “real” design work is usually done in something like Blend is crap because even with all the great GUI builders like Delphi, Visual Studio, Dreamweaver, etc. people are still constantly dropping down to the code to get that pixel perfect design so might as well offer up some snippets to make it easier.
- I’d like to talk to the person that decided that Silverlight’s margin property should list margin in “L T R B” order while CSS defines it as “T R B L”. It’s not exactly a horrible idea but why pollute the knowledge space needlessly and make people remember two almost identical things? There are obviously a lot of similarities between XAML and semantic XHTML yet instead of easing the transition by reusing common usage patterns they decided to make things just a little different. Annoying.
- For all my whinging defining UI via a markup-style language is definitely a plus, regardless of the angle bracket tax.
- I wonder if you could represent XAML or WPF as YAML instead? Staring at all the XML about breaks my head in two.
- Printing, is that even a possibility with Silverlight? How many times have I printed something from a web page with zero control over margins, headers, footers, etc. Seems some very cool label printing applications could be whipped up in Silverlight as well, CD labels, shipping, etc.