Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs	(revision 2781)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs	(revision 2782)
@@ -19,5 +19,11 @@
       TextEditor.Show();
       return true;
-    }  
+    }
+
+    public ILayout StandardTreeLayout {
+      get {
+        return (ILayout)this.FindActivity("Standard TreeLayout");
+      }
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446.csproj
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446.csproj	(revision 2781)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446.csproj	(revision 2782)
@@ -50,4 +50,11 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="NetronForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="NetronForm.Designer.cs">
+      <DependentUpon>NetronForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="NetronTestApplication.cs" />
     <Compile Include="NetronVisualization.cs">
       <SubType>Component</SubType>
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.Designer.cs	(revision 2782)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.Designer.cs	(revision 2782)
@@ -0,0 +1,69 @@
+﻿namespace HeuristicLab.Netron {
+  partial class NetronForm {
+    /// <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 Windows Form 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() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetronForm));
+      this.netronVisualization = new HeuristicLab.Netron.NetronVisualization();
+      ((System.ComponentModel.ISupportInitialize)(this.netronVisualization)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // netronVisualization
+      // 
+      this.netronVisualization.AllowDrop = true;
+      this.netronVisualization.AutoScroll = true;
+      this.netronVisualization.BackColor = System.Drawing.Color.DarkGray;
+      this.netronVisualization.BackgroundType = global::Netron.Diagramming.Core.CanvasBackgroundTypes.FlatColor;
+      this.netronVisualization.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.netronVisualization.EnableAddConnection = true;
+      this.netronVisualization.FileName = "";
+      this.netronVisualization.Location = new System.Drawing.Point(0, 0);
+      this.netronVisualization.Magnification = new System.Drawing.SizeF(71F, 71F);
+      this.netronVisualization.Name = "netronVisualization";
+      this.netronVisualization.Origin = new System.Drawing.Point(0, 0);
+      this.netronVisualization.ShowConnectors = true;
+      this.netronVisualization.ShowRulers = false;
+      this.netronVisualization.Size = new System.Drawing.Size(995, 567);
+      this.netronVisualization.TabIndex = 1;
+      this.netronVisualization.Text = "netronVisualization";
+      // 
+      // Form1
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(995, 567);
+      this.Controls.Add(this.netronVisualization);
+      this.Name = "Form1";
+      this.Text = "Form1";
+      ((System.ComponentModel.ISupportInitialize)(this.netronVisualization)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Netron.NetronVisualization netronVisualization;
+  }
+}
+
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.cs	(revision 2782)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronForm.cs	(revision 2782)
@@ -0,0 +1,82 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Netron.Diagramming.Core;
+
+namespace HeuristicLab.Netron {
+  public partial class NetronForm : Form {
+    public NetronForm() {
+      InitializeComponent();
+      ClassShape shape1 = new ClassShape();
+      shape1.Location = new Point(200, 200);
+      shape1.Name = "Shape 1";
+      IConnector c1b = shape1.Connectors.Where(c => c.Name == "Bottom connector").First();
+      IConnector c1t = shape1.Connectors.Where(c => c.Name == "Top connector").First();
+
+      ClassShape shape2 = new ClassShape();
+      shape2.Location = new Point(300, 300);
+      shape2.Name = "Shape 2";
+      IConnector c2b = shape2.Connectors.Where(c => c.Name == "Bottom connector").First();
+      IConnector c2t = shape2.Connectors.Where(c => c.Name == "Top connector").First();
+
+      ClassShape shape3 = new ClassShape();
+      shape3.Location = new Point(400, 400);
+      shape3.Name = "Shape 3";
+      IConnector c3b = shape3.Connectors.Where(c => c.Name == "Bottom connector").First();
+      IConnector c3t = shape3.Connectors.Where(c => c.Name == "Top connector").First();
+
+      ClassShape shape4 = new ClassShape();
+      shape4.Location = new Point(500, 500);
+      shape4.Name = "Shape 4";
+      IConnector c4b = shape4.Connectors.Where(c => c.Name == "Bottom connector").First();
+      IConnector c4t = shape4.Connectors.Where(c => c.Name == "Top connector").First();
+
+      ClassShape shape5 = new ClassShape();
+      shape5.Location = new Point(600, 600);
+      shape5.Name = "Shape 5";
+      IConnector c5b = shape5.Connectors.Where(c => c.Name == "Bottom connector").First();
+      IConnector c5t = shape5.Connectors.Where(c => c.Name == "Top connector").First();
+
+      Connection c1 = new Connection(c1b.Point, c2t.Point, netronVisualization.Controller.Model);
+      c1b.AttachConnector(c1.From);
+      c2t.AttachConnector(c1.To);
+
+      Connection c2 = new Connection(c1b.Point, c3t.Point, netronVisualization.Controller.Model);
+      c1b.AttachConnector(c2.From);
+      c3t.AttachConnector(c2.To);
+
+      Connection c3 = new Connection(c2b.Point, c4t.Point, netronVisualization.Controller.Model);
+      c2b.AttachConnector(c3.From);
+      c4t.AttachConnector(c3.To);
+
+      Connection c4 = new Connection(c3b.Point, c4t.Point, netronVisualization.Controller.Model);
+      c3b.AttachConnector(c4.From);
+      c4t.AttachConnector(c4.To);
+
+      Connection c5 = new Connection(c4b.Point, c5t.Point, netronVisualization.Controller.Model);
+      c4b.AttachConnector(c5.From);
+      c5t.AttachConnector(c5.To);
+
+      netronVisualization.Controller.Model.AddShape(shape1);
+      netronVisualization.Controller.Model.AddShape(shape2);
+      netronVisualization.Controller.Model.AddShape(shape3);
+      netronVisualization.Controller.Model.AddShape(shape4);
+      netronVisualization.Controller.Model.AddShape(shape5);
+
+      netronVisualization.Controller.Model.AddConnection(c1);
+      netronVisualization.Controller.Model.AddConnection(c2);
+      netronVisualization.Controller.Model.AddConnection(c3);
+      netronVisualization.Controller.Model.AddConnection(c4);
+      netronVisualization.Controller.Model.AddConnection(c5);
+
+      netronVisualization.Controller.View.Invalidate();
+      netronVisualization.Controller.Model.LayoutRoot = shape1;
+      netronVisualization.Controller.RunActivity("Standard TreeLayout");
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronTestApplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronTestApplication.cs	(revision 2782)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronTestApplication.cs	(revision 2782)
@@ -0,0 +1,15 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Netron {
+  [Application("Netron Test Application 3.3", "A test application for netron visualizations.")]
+  internal class NetronTestApplication : ApplicationBase {
+    public override void Run() {
+      Application.Run(new NetronForm());
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs	(revision 2781)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs	(revision 2782)
@@ -13,7 +13,10 @@
   [ToolboxItem(true)]
   public partial class NetronVisualization : DiagramControlBase {
+    private static Size INVALID_SIZE = new Size(-1,-1);
+    private Size oldSize;
     public NetronVisualization()
       : base() {
       InitializeComponent();
+      this.oldSize = INVALID_SIZE;
 
       SetStyle(ControlStyles.AllPaintingInWmPaint, true);
@@ -34,13 +37,26 @@
         View.OnBackColorChange += new EventHandler<ColorEventArgs>(View_OnBackColorChange);
 
-        this.SizeChanged += new EventHandler(AlgorithmVisualization_SizeChanged);
+        this.SizeChanged += new EventHandler(NetronVisualization_SizeChanged);
         this.AllowDrop = true;
       }
     }
 
-    void AlgorithmVisualization_SizeChanged(object sender, EventArgs e) {
-      Size newSize = new Size((int) (this.Size.Width * this.View.Magnification.Width),
-        (int) (this.Size.Height * this.View.Magnification.Height));
-      this.View.PageSize = newSize;
+    private void NetronVisualization_SizeChanged(object sender, EventArgs e) {
+      if (this.oldSize == INVALID_SIZE) {
+        this.View.PageSize = new Size((int)(this.Size.Width * this.Magnification.Width), (int)(this.Size.Height * this.Magnification.Height));
+        oldSize = this.Size;
+        return;
+      }
+
+      SizeF magnificationChanges = new SizeF();
+      magnificationChanges.Width = ((float)this.Size.Width) / oldSize.Width;
+      magnificationChanges.Height = ((float)this.Size.Height) / oldSize.Height;
+
+      SizeF newMagnification = new SizeF();
+      newMagnification.Width = this.View.Magnification.Width * magnificationChanges.Width;
+      newMagnification.Height = this.View.Magnification.Height * magnificationChanges.Height;
+
+      this.Magnification = newMagnification;
+      this.oldSize = this.Size;
     }
 
@@ -53,5 +69,5 @@
         Origin = new Point(Origin.X, se.NewValue);
         //System.Diagnostics.Trace.WriteLine(se.NewValue);
-      } 
+      }
     }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs	(revision 2781)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs	(revision 2782)
@@ -169,6 +169,10 @@
 
                 // Offset the upper-left corner by 1 inch.
-                float x = 1F * Display.DpiX;
-                float y = 1F * Display.DpiY;
+                //float x = 1F * Display.DpiX;
+                //float y = 1F * Display.DpiY;
+
+              //inserted to remove margin around the drawi-ng aera
+                float x = 0;
+                float y = 0;
 
                 RectangleF bounds = new RectangleF(x, y, width, height);
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 2781)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 2782)
@@ -186,8 +186,8 @@
             get
             {
-                if (m_anchor != null)
-                {
-                    return m_anchor;
-                }
+                //if (m_anchor != null)
+                //{
+                //    return m_anchor;
+                //}
 
                 m_tmpa = PointF.Empty;
