Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by Amit on Jul 29th, 2008 | Filed under .Net, WPF | 8 Comments

Have you ever tried to create a DataTemplate for a Generic Class? During last week I had to battle this issue and it is allot more complicated then it sounds. As far as I can tell Creating DataTemplates for Generic classes is impossible. There is some kind of workaround but it is not all that good. OK lets get down to business. This is the class we are trying to template

   1: public class GenericClass<T>
   2: {
   3:     private T m_Val;
   4:  
   5:     public T Val
   6:     {
   7:         get { return m_Val; }
   8:         set { m_Val = value; }
   9:     }
  10: }


Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More