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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -