June 19, 2004 .net

Chris Anderson on Avalon Visual Extensibility

Chris Anderson just did a fabulous job describing what makes Avalon more extensible than existing popular UI frameworks. What Avalon allows is the ability to have a Button instance like so:


And then, somewhere else, using Styles, setting the VisualTree of what a Button looks like to be whatever you like, e.g.

  <Button />
      <!-- anything you like in here, e.g. <Text>, <Video>, <Rectangle>, whatever -->
      <ContentPresenter />

Two interesting things about this button style. The first is that you can make a Button look however you want it to look, without worrying whether the Avalon team had that in mind up front. Two, when you want to drop in the content inside the Button tag, e.g. Hello”, you drop in the ContentPresentor and it knows how to display what was placed in the Button (again, which could be anything). Simple and flexible: two things that I’m finding to be true more and more about Avalon the further I dig.