Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs	(revision 2437)
@@ -9,5 +9,5 @@
     public void Execute(IMainForm mainform) {
       MessageBox.Show("New form called");
-      FormView x = new FormView();
+      FormView1 x = new FormView1();
       x.Caption = "FormView";
       mainform.ShowView(x);
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/ButtonItems/SaveToolStripButtonItem.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/ButtonItems/SaveToolStripButtonItem.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/ButtonItems/SaveToolStripButtonItem.cs	(revision 2437)
@@ -28,5 +28,5 @@
         this.ToolStripItem.Enabled = false;
       else
-        this.ToolStripItem.Enabled = !(mainform.ActiveView is FormView);
+        this.ToolStripItem.Enabled = !(mainform.ActiveView is FormView1);
     }
 
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/EditorView.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/EditorView.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/EditorView.cs	(revision 2437)
@@ -8,8 +8,9 @@
 using System.Windows.Forms;
 using HeuristicLab.MainForm.WindowsForms;
+using System.Collections;
 
 namespace HeuristicLab.MainForm.Test {
   [DefaultView]
-  public partial class EditorView : ViewBase<object>,IView<string> {
+  public partial class EditorView : ViewBase<IList> {
     public EditorView() {
       InitializeComponent();
@@ -17,15 +18,16 @@
 
     private void ChangeStateButton_Click(object sender, EventArgs e) {
-      IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(string));
+      IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(ArrayList));
       views.ToString();
-      IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(object));
+      IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(IList));
       views1.ToString();
-      Type def1 = MainFormManager.GetDefaultViewType(typeof(string));
+      //IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(object));
+      //views2.ToString();
+      Type def2 = MainFormManager.GetDefaultViewType(typeof(IList));
+      def2.ToString();
+      Type def1 = MainFormManager.GetDefaultViewType(typeof(ArrayList));
       def1.ToString();
-      Type def2 = MainFormManager.GetDefaultViewType(typeof(object));
-      def2.ToString();
-
-      IView<string> v = MainFormManager.CreateDefaultView<string>("x");
-      v.Caption = "lala";
+      //Type def3 = MainFormManager.GetDefaultViewType(typeof(object));
+      //def3.ToString();
 
       this.OnChanged();
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.Designer.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.Designer.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.Designer.cs	(revision 2437)
@@ -1,4 +1,4 @@
 ﻿namespace HeuristicLab.MainForm.Test {
-  partial class FormView {
+  partial class FormView1 {
     /// <summary> 
     /// Required designer variable.
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView.cs	(revision 2437)
@@ -10,7 +10,8 @@
 
 namespace HeuristicLab.MainForm.Test {
-  public partial class FormView : ViewBase<object>  {
+  [DefaultView]
+  public partial class FormView1 : ViewBase<ICloneable>  {
     private int[] array;
-    public FormView() {
+    public FormView1() {
       InitializeComponent();
     }
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.Designer.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.Designer.cs	(revision 2437)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.Designer.cs	(revision 2437)
@@ -0,0 +1,55 @@
+﻿namespace HeuristicLab.MainForm.Test {
+  partial class FormView2 {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.label1 = new System.Windows.Forms.Label();
+      this.SuspendLayout();
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.ForeColor = System.Drawing.Color.Coral;
+      this.label1.Location = new System.Drawing.Point(112, 110);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(61, 13);
+      this.label1.TabIndex = 0;
+      this.label1.Text = "Form VIEW";
+      // 
+      // FormView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.label1);
+      this.Name = "FormView";
+      this.Size = new System.Drawing.Size(385, 267);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label label1;
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.cs	(revision 2437)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.cs	(revision 2437)
@@ -0,0 +1,18 @@
+﻿using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.MainForm.Test {
+  public partial class FormView2 : ViewBase<ArrayList>  {
+    private int[] array;
+    public FormView2() {
+      InitializeComponent();
+    }
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.resx
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.resx	(revision 2437)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/FormView2.resx	(revision 2437)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/HeuristicLab.MainForm.Test-3.2.csproj
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/HeuristicLab.MainForm.Test-3.2.csproj	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.Test/3.2/HeuristicLab.MainForm.Test-3.2.csproj	(revision 2437)
@@ -87,4 +87,10 @@
     <Compile Include="ButtonItems\SaveToolStripButtonItem.cs" />
     <Compile Include="ButtonItems\OpenToolStripButtonItem.cs" />
+    <Compile Include="FormView2.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FormView2.Designer.cs">
+      <DependentUpon>FormView2.cs</DependentUpon>
+    </Compile>
     <Compile Include="HeuristicLabSingleDocumentMainFormTestApplication.cs" />
     <Compile Include="HeuristicLabMultipleDocumentMainFormTestApplication.cs" />
@@ -140,4 +146,7 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="FormView2.resx">
+      <DependentUpon>FormView2.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="EditorView.resx">
       <DependentUpon>EditorView.cs</DependentUpon>
Index: branches/Mainform refactoring/HeuristicLab.MainForm.WindowsForms/3.2/MainFormBase.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm.WindowsForms/3.2/MainFormBase.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm.WindowsForms/3.2/MainFormBase.cs	(revision 2437)
@@ -75,5 +75,4 @@
     public Type UserInterfaceItemType {
       get { return this.userInterfaceItemType; }
-      protected set { this.userInterfaceItemType = value; }
     }
 
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2434)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2437)
@@ -84,12 +84,9 @@
 
     public static IEnumerable<Type> GetViewTypes(Type viewableType) {
-      List<Type> viewsForType;
-      if (!views.ContainsKey(viewableType))
-        viewsForType = new List<Type>();
-      else
-        viewsForType = views[viewableType];
-
-      if (viewableType.BaseType != null)
-        viewsForType.AddRange(GetViewTypes(viewableType.BaseType));
+      List<Type> viewsForType = new List<Type>();
+      foreach (KeyValuePair<Type, List<Type>> v in views) {
+        if (v.Key.IsAssignableFrom(viewableType))
+          viewsForType.AddRange(v.Value);
+      }
       return viewsForType.Distinct();
     }
@@ -100,7 +97,24 @@
 
     public static Type GetDefaultViewType(Type viewableType) {
-      if (!defaultViews.ContainsKey(viewableType))
-        return null;
-      return defaultViews[viewableType];
+      if (!defaultViews.ContainsKey(viewableType)) {
+        List<Type> temp = defaultViews.Keys.Where(x => x.IsAssignableFrom(viewableType)).ToList();
+        if (temp.Count == 0)
+          return null;
+        else if (temp.Count == 1)
+          return defaultViews[temp[0]];
+        else {
+          temp.Sort(delegate(Type t1, Type t2) {
+            if (t1.IsAssignableFrom(t2))
+              return 1;
+            return -1;
+          }
+          );
+          if (!temp[0].IsAssignableFrom(temp[1]) && !temp[1].IsAssignableFrom(temp[0]))
+            throw new Exception("Could not determine which is the default view for type " + viewableType.ToString() + ".");
+          else
+            return defaultViews[temp[0]];
+        }
+      } else
+        return defaultViews[viewableType];
     }
 
@@ -110,5 +124,5 @@
         return null;
       else
-        return (IView<T>) Activator.CreateInstance(t);
+        return (IView<T>)Activator.CreateInstance(t);
     }
   }
