JOEHEWITT.COM

Thoughts on software and life.

Monday October 27

XAML thoughts, part 2

One thing that is noticeably missing from XAML is the XUL flexible layout model. Instead, there are the FlowPanel and DockPanel layout models, which could be combined for a similar effect. It seems that flex could be approximated by specifying a width or height as a percentage. DockPanel is similar to Java's "BorderLayout", and FlowPanel is like XUL box that can wrap when it runs out of space. Good stuff.

One thing I definitely don't like about XAML is the Canvas element. Canvas is a special container that allows for absolute positioning. What I would prefer instead is the ability to allow any element to become "fixed" (absolutely positioned) relative to its panel, regardless of the layout model. This way you wouldn't need extraneous panels just to use fixed positioning on one element.

XAML has its own language for expressing vector graphics, called WVG. This is not in any way compatible with SVG, for better or worse. Like SVG, you can define shapes, paths, solid, gradient, and pattern brushes, fills, and strokes. There is also an animation language, much like SMIL, which allows you to animate properties or perform additive 2D transformations. I'd imagine these animations will be quite speedy with full GPU acceleration.

XAML also includes another no-brainer feature that the W3C has ignored: the ability to slice an image into a nine-section grid and use it to fill a background. This is a feature we should have implemented in Mozilla to reduce the amount of complex XBL used to accomplish the same effect.

at
Posting your comment. Please Wait...