c# - Can I specify a generic type in XAML (pre .NET 4 Framework)? -
in xaml can declare datatemplate template used whenever specific type displayed. example, datatemplate use textblock display name of customer:
<datatemplate datatype="{x:type my:customer}"> <textblock text="{binding name}" /> </datatemplate>
i'm wondering if it's possible define datatemplate used time ilist<customer> displayed. if contentcontrol's content is, say, observablecollection<customer> use template.
is possible declare generic type ilist in xaml using {x:type} markup extension?
not out of box, no; there enterprising developers out there have done so.
mike hillberg @ microsoft played in this post, example. google has others of course.
Comments
Post a Comment