tags:

views:

74

answers:

1

I am new to WPF, have read some books about it, but now I am stuck.

I have a generic class and a few concrete implementation of it

public class Question<T>
{
    List<T> AvailableAnswers;
    T Correct Answer;
    MidiSound SoundFragment;
    String Question;
}

public class IntervalQuestion : Question<Interval>
public class ScaleQuestion : Question<Scale>

I want my view to display the question, let the user choose between the answers etc.

I only can't find a way to implement this with WPF, it looks like you can't create a view that is based on a generic object?

Am I missing something here?

+1  A: 

The distributions of WPF and XAML don't come with built in support for generic types, but it's possible to extend WPF using markup extensions to provide some support.

See this SO question, and this article

Aviad P.