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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -