In my trials and tribulations in bulding my RSS aggregator for Longhorn, I've started
to try to put together a custom control to do my feed grouping, since the Avalon treeview
isn't available yet. I've watched Jeff Bogdan's excellent PDC
session a few times (with varying levels of attention paid each time - maybe
that's why I don't quite “get it” yet), read through examples put together
by Ryan Dawson and Nathan
Dunlap, and I've been digging through the Longhorn
SDK, and I can't help but wonder about one thing: what about a default style?
I understand that in Avalon, we're supposed to strive to create controls that have
no hard-coded knowledge of their presentation - just the underlying logic. I
dig that, it allows for the greatest amount of flexibility, and takes a lot of the
need away for the control coder to force himself to design a control that looks good
for all situations. My problem is that I can't find any way to define a default
style, a default visual tree for the custom control. Right now, we have to create
a style for the control in the application in which it's loaded, and that's ok - for
now.
I can't see it working in the long run - are we going to have to distribute a XAML
file with our control, so that developers can plug it into their application and start
coding right away, or will there eventually be a way to define a default style/visual
tree inside the control, so that all we'll need to distribute is the DLL? Or,
OR am I missing something in the SDK or the demos or somewhere that
defines how to get this done?
Enquiring minds want to know... or at least be pointed in the right direction.
- G
[UPDATE - Rob Relyea (PM, Avalon) mentions in the comments that what I want will
be possible when it's all said and done - just not yet.]

This
work is licensed under a
Creative
Commons License.