"Iain" <> wrote in message
news:...
> I want to build a templated control which will be the graphical
> representation of a complex object.
>
> So the object has a list of items (line items on an order) and some items
> can contain other items (specifically, some items can be custom CDs with
> individual tracks on).
>
> So I when I come to render I want to bind to the object and enumerate
> through the collection. But when I come to an item which contains other
> items I want to use a different set of templates, specifically with
> templates for each sub item.
>
> I sort of understand templated databinding, but I'm struggling with the
> relationship between CreateControls and Render on this one.
>
> Any advice out there?
Sure, you could have a template for an item and one for subitems. If
necessary, you could have a template for each kind of subitem. Just add an
ITemplate property for each possible kind of subitem.
--
John Saunders
johnwsaundersiii at hotmail
|