In my previous post I don't think I was clear about the methodology that Avalon uses
to hack (err, customize) the XAML parsing. This caused Pete Cole to observe:
"That a hack is 'by design' doesn't make it any less of an inelegant, unsatisfactory
hack. This does explain some of the bizarre syntax I have previously complained about.
One wonders if the implementation of XAML is becoming like writing Word Processors
- you end up putting in kludges/hacks in the code to cope with particular strange
cases. That's OK a) the hack works and b) its invisible to the 'user' (they just
see the programming formatting correctly as they expect) - hacking implementation
of a 'programming' language ain't going to work." [Pete
Cole]
The interesting to note, it is actually the Style object that implements the custom
parsing and serialization of markup to support the "as use" syntax. This interface
is documented and discoverable (both by tools and developers). In addition any component
can implement the interface and customize their parsing.
Hack, maybe. Invisible, no.