Index: trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs	(revision 2712)
+++ trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs	(revision 2724)
@@ -60,4 +60,10 @@
              select a.type;
     }
+
+    internal static IEnumerable<Type> GetViewableTypes(Type viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return from a in attributes
+             select a.type;
+    }
   }
 }
Index: trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2712)
+++ trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2724)
@@ -76,7 +76,12 @@
 
     public static IEnumerable<Type> GetViewTypes(Type contentType) {
-      return from v in views
-             where ContentAttribute.CanViewType(v, contentType)
-             select v;
+      List<Type> viewTypes = (from v in views
+                              where ContentAttribute.CanViewType(v, contentType)
+                              select v).ToList();
+      //transform generic type definitions to generic types
+      for (int i = 0; i < viewTypes.Count; i++) {
+        viewTypes[i] = TransformGenericTypeDefinition(viewTypes[i], contentType);
+      }
+      return viewTypes;
     }
 
@@ -93,7 +98,7 @@
       Type type = contentType;
       while (type != null) {
-        foreach (Type defaultViewType in defaultViews.Keys) {
-          if (type == defaultViewType || type.CheckGenericTypes(defaultViewType))
-            return defaultViews[defaultViewType];
+        foreach (Type defaultContentType in defaultViews.Keys) {
+          if (type == defaultContentType || type.CheckGenericTypes(defaultContentType))
+            return TransformGenericTypeDefinition(defaultViews[defaultContentType], contentType);
         }
         type = type.BaseType;
@@ -105,5 +110,5 @@
                          select t).ToList();
       if (temp.Count == 1)
-        return defaultViews[temp[0]];
+        return TransformGenericTypeDefinition(defaultViews[temp[0]], contentType);
       //more than one default view for implemented interfaces are found
       if (temp.Count > 1)
@@ -117,9 +122,5 @@
         return null;
 
-      Type viewType = TransformGenericTypeDefinition(t, objectToView);
-      if (viewType == null)
-        return null;
-
-      return (IView)Activator.CreateInstance(viewType, objectToView);
+      return (IView)Activator.CreateInstance(t, objectToView);
     }
 
@@ -136,28 +137,52 @@
       if (!typeof(IView).IsAssignableFrom(viewType))
         throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView.");
+      if (viewType.IsGenericTypeDefinition)
+        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is a generic type definition.");
 
-      Type t = TransformGenericTypeDefinition(viewType, objectToView);
-      if (t == null)
-        return null;
-
-      return (IView)Activator.CreateInstance(t, objectToView);
+      return (IView)Activator.CreateInstance(viewType, objectToView);
     }
 
-    private static Type TransformGenericTypeDefinition(Type type, object objectToView) {
-      if (!type.IsGenericTypeDefinition)
-        return type;
+    private static Type TransformGenericTypeDefinition(Type viewType, Type contentType) {
+      if (contentType.IsGenericTypeDefinition)
+        throw new ArgumentException("The content type " + contentType.ToString() + " must not be a generic type definition.");
 
-      Type[] typeGenericArguments = type.GetGenericArguments();
-      Type[] objectGenericArguments = objectToView.GetType().GetGenericArguments();
+      if (!viewType.IsGenericTypeDefinition)
+        return viewType;
 
-      for (int i = 0; i < typeGenericArguments.Length; i++) {
-        foreach (Type typeConstraint in typeGenericArguments[i].GetGenericParameterConstraints()) {
-          if (!typeConstraint.IsAssignableFrom(objectGenericArguments[i]))
+      Type contentTypeBaseType = contentType;
+      foreach (Type type in ContentAttribute.GetViewableTypes(viewType)) {
+        while (contentTypeBaseType != null && (!contentTypeBaseType.IsGenericType ||
+              type.GetGenericTypeDefinition() != contentTypeBaseType.GetGenericTypeDefinition()))
+          contentTypeBaseType = contentTypeBaseType.BaseType;
+
+        //check interfaces for generic type arguments
+        if (contentTypeBaseType == null) {
+          IEnumerable<Type> implementedInterfaces = contentType.GetInterfaces().Where(t => t.IsGenericType);
+          foreach (Type implementedInterface in implementedInterfaces) {
+            if (implementedInterface.CheckGenericTypes(viewType))
+              contentTypeBaseType = implementedInterface;
+          }
+        }
+      }
+
+      if (!contentTypeBaseType.IsGenericType)
+        throw new ArgumentException("Neither content type itself nor any of its base classes is a generic type. Could not determine generic type argument for the view.");
+
+      Type[] viewTypeGenericArguments = viewType.GetGenericArguments();
+      Type[] contentTypeGenericArguments = contentTypeBaseType.GetGenericArguments();
+
+      if (contentTypeGenericArguments.Length != viewTypeGenericArguments.Length)
+        throw new ArgumentException("Neiter the type (" + contentType.ToString() + ") nor any of its base types specifies " +
+          viewTypeGenericArguments.Length + " generic type arguments.");
+
+      for (int i = 0; i < viewTypeGenericArguments.Length; i++) {
+        foreach (Type typeConstraint in viewTypeGenericArguments[i].GetGenericParameterConstraints()) {
+          if (!typeConstraint.IsAssignableFrom(contentTypeGenericArguments[i]))
             return null;
         }
       }
 
-      Type t = type.MakeGenericType(objectToView.GetType().GetGenericArguments());
-      return t;
+      Type returnType = viewType.MakeGenericType(contentTypeGenericArguments);
+      return returnType;
     }
   }
Index: trunk/sources/HeuristicLab.MainForm/3.2/TypeExtension.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/TypeExtension.cs	(revision 2712)
+++ trunk/sources/HeuristicLab.MainForm/3.2/TypeExtension.cs	(revision 2724)
@@ -32,14 +32,13 @@
         return true;
 
-      if (type.IsGenericType && other.IsGenericType) {
-        if (recursiveCheckGenericTypes(type, other))
+      if (recursiveCheckGenericTypes(type, other))
+        return true;
+
+      IEnumerable<Type> implementedInterfaces = type.GetInterfaces().Where(t => t.IsGenericType);
+      foreach (Type implementedInterface in implementedInterfaces) {
+        if (implementedInterface.CheckGenericTypes(other))
           return true;
+      }
 
-        IEnumerable<Type> implementedInterfaces = type.GetInterfaces().Where(t => t.IsGenericType);
-        foreach (Type implementedInterface in implementedInterfaces) {
-          if (implementedInterface.CheckGenericTypes(other))
-            return true;
-        }
-      }
       return false;
     }
@@ -79,4 +78,9 @@
       return true;
     }
+
+    internal static Type[] ExtractGenericTypeArguments(this Type type, Type other) {
+      Type[] types = new Type[0];
+      return types;
+    }
   }
 }
