Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs	(revision 13114)
@@ -37,14 +37,4 @@
     private bool SuppressRender { get; set; }
 
-    public PictureBox PictureBox { get { return pictureBox; } }
-
-    public Color BackgroundColor {
-      get { return chart != null ? chart.BackgroundColor : Color.Empty; }
-      set {
-        if (chart == null || chart.BackgroundColor == value) return;
-        chart.BackgroundColor = value;
-      }
-    }
-
     private IChart chart;
     public IChart Chart {
@@ -112,4 +102,16 @@
       SuppressRender = false;
       if (Chart != null) GenerateImage();
+    }
+
+    public void RefreshPicture() {
+      pictureBox.Refresh();
+    }
+
+    public void UpdatePicture() {
+      pictureBox.Update();
+    }
+
+    public Graphics CreatePictureGraphics() {
+      return pictureBox.CreateGraphics();
     }
 
Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/PanChartMode.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/PanChartMode.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/PanChartMode.cs	(revision 13114)
@@ -35,14 +35,4 @@
     public PanChartMode(ChartControl control) : base(control) { }
 
-    public override void HandleOnMouseUp(object sender, MouseEventArgs e) {
-      base.HandleOnMouseUp(sender, e);
-
-      switch (e.Button) {
-        case MouseButtons.Middle:
-          chartControl.Chart.Unzoom();
-          break;
-      }
-    }
-
     public override void HandleOnMouseMove(object sender, MouseEventArgs e) {
       try {
@@ -56,5 +46,5 @@
         }
       } finally {
-        chartControl.PictureBox.Update();
+        chartControl.UpdatePicture();
         base.HandleOnMouseMove(sender, e);
       }
Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/RulerChartMode.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/RulerChartMode.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/RulerChartMode.cs	(revision 13114)
@@ -43,41 +43,50 @@
     public RulerChartMode(ChartControl control) : base(control) { }
 
+    public override void HandleOnMouseDown(object sender, MouseEventArgs e) {
+      try {
+        if (startPoint.HasValue) {
+          if (startPoint.Value == e.Location) {
+            startPoint = null;
+            chartControl.RefreshPicture();
+          }
+        } else
+          startPoint = e.Location;
+      } finally {
+        base.HandleOnMouseDown(sender, e);
+      }
+    }
+
     public override void HandleOnMouseMove(object sender, MouseEventArgs e) {
-      if (startPoint.HasValue) {
-        try {
-          chartControl.PictureBox.Refresh();
-          DrawCross(startPoint.Value);
-          DrawCross(e.Location);
-          DrawLineBetweenLocations(startPoint.Value, e.Location);
-        } finally {
-          chartControl.PictureBox.Update();
-          base.HandleOnMouseMove(sender, e);
+      try {
+        if (startPoint.HasValue) {
+          chartControl.RefreshPicture();
+          using (var graphics = chartControl.CreatePictureGraphics()) {
+            DrawCross(graphics, startPoint.Value);
+            DrawCross(graphics, e.Location);
+            DrawLineBetweenLocations(graphics, startPoint.Value, e.Location);
+          }
         }
+      } finally {
+        base.HandleOnMouseMove(sender, e);
       }
     }
 
     public override void HandleOnMouseUp(object sender, MouseEventArgs e) {
-      base.HandleOnMouseUp(sender, e);
-
-      switch (e.Button) {
-        case MouseButtons.Left:
-          if (!startPoint.HasValue)
-            startPoint = e.Location;
-          else {
-            if (e.Location != startPoint.Value)
-              DrawInfoBox(e.Location);
-            else {
-              chartControl.PictureBox.Refresh();
-              chartControl.PictureBox.Update();
+      try {
+        switch (e.Button) {
+          case MouseButtons.Left:
+            if (startPoint.HasValue && startPoint.Value != e.Location) {
+              using (var graphics = chartControl.CreatePictureGraphics())
+                DrawInfoBox(graphics, e.Location);
+              startPoint = null;
             }
-
-            startPoint = null;
-          }
-          break;
+            break;
+        }
+      } finally {
+        base.HandleOnMouseUp(sender, e);
       }
     }
 
-    protected virtual void DrawCross(Point point) {
-      using (var graphics = chartControl.PictureBox.CreateGraphics())
+    protected virtual void DrawCross(Graphics graphics, Point point) {
       using (var pen = new Pen(Color.Red)) {
         graphics.DrawLine(pen, point.X - 3, point.Y - 3, point.X + 3, point.Y + 3);
@@ -86,11 +95,10 @@
     }
 
-    protected virtual void DrawLineBetweenLocations(Point startLocation, Point endLocation) {
-      using (var graphics = chartControl.PictureBox.CreateGraphics())
+    protected virtual void DrawLineBetweenLocations(Graphics graphics, Point startLocation, Point endLocation) {
       using (var pen = new Pen(Color.Red))
         graphics.DrawLine(pen, startLocation.X, startLocation.Y, endLocation.X, endLocation.Y);
     }
 
-    protected virtual void DrawInfoBox(Point location) {
+    protected virtual void DrawInfoBox(Graphics graphics, Point location) {
       var offsetP = new Size(location.X - startPoint.Value.X, location.Y - startPoint.Value.Y);
       var offsetW = chartControl.Chart.TransformPixelToWorld(offsetP);
@@ -98,15 +106,14 @@
       double lengthP = Math.Sqrt(Math.Pow(offsetP.Width, 2) + Math.Pow(offsetP.Height, 2));
       double lengthW = Math.Sqrt(Math.Pow(offsetW.Width, 2) + Math.Pow(offsetW.Height, 2));
-      string text = string.Format("Pixel: {0}{1}World: {2:##.###}", Math.Round(lengthP), Environment.NewLine, Math.Round(lengthW, 3));
+      string text = string.Format("Pixel: {0} " + Environment.NewLine + "World: {1:##.###}", Math.Round(lengthP), Math.Round(lengthW, 3));
 
-      using (var graphics = chartControl.PictureBox.CreateGraphics()) {
-        var textSize = graphics.MeasureString(text, SystemFonts.DefaultFont);
-        int width = (int)Math.Ceiling(textSize.Width);
-        int height = (int)Math.Ceiling(textSize.Height);
+      var textSize = graphics.MeasureString(text, SystemFonts.DefaultFont);
+      int width = (int)Math.Ceiling(textSize.Width);
+      int height = (int)Math.Ceiling(textSize.Height);
 
-        graphics.FillRectangle(Brushes.White, location.X, location.Y, width, height);
-        graphics.DrawRectangle(Pens.Red, location.X, location.Y, width, height);
-        graphics.DrawString(text, SystemFonts.DefaultFont, Brushes.Black, location.X, location.Y + 2);
-      }
+      graphics.FillRectangle(Brushes.White, location.X, location.Y, width, height);
+      graphics.DrawRectangle(Pens.Red, location.X, location.Y, width, height);
+      graphics.DrawString(text, SystemFonts.DefaultFont, Brushes.Black, location.X, location.Y + 2);
+
     }
   }
Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/SelectChartMode.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/SelectChartMode.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/SelectChartMode.cs	(revision 13114)
@@ -33,43 +33,37 @@
 
     public override void HandleOnKeyDown(object sender, KeyEventArgs e) {
-      base.HandleOnKeyDown(sender, e);
-
-      switch (e.KeyCode) {
-        case Keys.Delete:
-          if (e.KeyCode == Keys.Delete) {
-            try {
-              chartControl.SuspendRendering();
-              foreach (var primitive in chartControl.Chart.Group.SelectedPrimitives)
-                chartControl.Chart.Group.Remove(primitive);
-            } finally { chartControl.ResumeRendering(); }
-          }
-          break;
+      try {
+        switch (e.KeyCode) {
+          case Keys.Delete:
+            if (e.KeyCode == Keys.Delete) {
+              try {
+                chartControl.SuspendRendering();
+                foreach (var primitive in chartControl.Chart.Group.SelectedPrimitives)
+                  chartControl.Chart.Group.Remove(primitive);
+              } finally { chartControl.ResumeRendering(); }
+            }
+            break;
+        }
+      } finally {
+        base.HandleOnKeyDown(sender, e);
       }
     }
 
     public override void HandleOnMouseDown(object sender, MouseEventArgs e) {
-      base.HandleOnMouseDown(sender, e);
-
       try {
-        chartControl.SuspendRendering();
-        var worldLocation = chartControl.Chart.TransformPixelToWorld(e.Location);
-        foreach (var sp in chartControl.Chart.Group.SelectedPrimitives.Where(x => !x.ContainsPoint(worldLocation)))
-          sp.Selected = false;
-        var p = chartControl.Chart.GetPrimitive(e.Location);
-        if (p != null) p.Selected = true;
-      } finally { chartControl.ResumeRendering(); }
-    }
-
-    public override void HandleOnMouseUp(object sender, MouseEventArgs e) {
-      base.HandleOnMouseUp(sender, e);
-
-      switch (e.Button) {
-        case MouseButtons.Middle:
-          try {
-            chartControl.SuspendRendering();
-            foreach (var p in chartControl.Chart.Group.SelectedPrimitives)
-              p.Selected = false;
-          } finally { chartControl.ResumeRendering(); }
-          break;
+        switch (e.Button) {
+          case MouseButtons.Left:
+            try {
+              chartControl.SuspendRendering();
+              var worldLocation = chartControl.Chart.TransformPixelToWorld(e.Location);
+              foreach (var sp in chartControl.Chart.Group.SelectedPrimitives.Where(x => !x.ContainsPoint(worldLocation)))
+                sp.Selected = false;
+              var p = chartControl.Chart.GetPrimitive(e.Location);
+              if (p != null) p.Selected = true;
+            } finally { chartControl.ResumeRendering(); }
+            break;
+        }
+      } finally {
+        base.HandleOnMouseDown(sender, e);
       }
     }
@@ -92,5 +86,5 @@
         }
       } finally {
-        chartControl.PictureBox.Update();
+        chartControl.UpdatePicture();
         base.HandleOnMouseMove(sender, e);
       }
Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomInChartMode.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomInChartMode.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomInChartMode.cs	(revision 13114)
@@ -38,17 +38,19 @@
 
     public override void HandleOnMouseUp(object sender, MouseEventArgs e) {
-      base.HandleOnMouseUp(sender, e);
-
-      switch (e.Button) {
-        case MouseButtons.Left:
-          var lowerLeft = new Point(Math.Min(e.X, buttonDownPoint.X), Math.Max(e.Y, buttonDownPoint.Y));
-          var upperRight = new Point(Math.Max(e.X, buttonDownPoint.X), Math.Min(e.Y, buttonDownPoint.Y));
-          if ((lowerLeft.X != upperRight.X) && (lowerLeft.Y != upperRight.Y))
-            chartControl.Chart.ZoomIn(lowerLeft, upperRight);
-          else chartControl.Chart.ZoomIn(buttonDownPoint);
-          break;
-        case MouseButtons.Middle:
-          chartControl.Chart.Unzoom();
-          break;
+      try {
+        switch (e.Button) {
+          case MouseButtons.Left:
+            var lowerLeft = new Point(Math.Min(e.X, buttonDownPoint.X), Math.Max(e.Y, buttonDownPoint.Y));
+            var upperRight = new Point(Math.Max(e.X, buttonDownPoint.X), Math.Min(e.Y, buttonDownPoint.Y));
+            if ((lowerLeft.X != upperRight.X) && (lowerLeft.Y != upperRight.Y))
+              chartControl.Chart.ZoomIn(lowerLeft, upperRight);
+            else chartControl.Chart.ZoomIn(buttonDownPoint);
+            break;
+          case MouseButtons.Middle:
+            chartControl.Chart.Unzoom();
+            break;
+        }
+      } finally {
+        base.HandleOnMouseUp(sender, e);
       }
     }
@@ -58,6 +60,6 @@
         switch (e.Button) {
           case MouseButtons.Left:
-            chartControl.PictureBox.Refresh();
-            using (var graphics = chartControl.PictureBox.CreateGraphics())
+            chartControl.RefreshPicture();
+            using (var graphics = chartControl.CreatePictureGraphics())
             using (var pen = new Pen(Color.Gray) { DashStyle = DashStyle.Dash }) {
               graphics.DrawRectangle(pen,
@@ -70,5 +72,5 @@
         }
       } finally {
-        chartControl.PictureBox.Update();
+        chartControl.UpdatePicture();
         base.HandleOnMouseMove(sender, e);
       }
Index: /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomOutChartMode.cs
===================================================================
--- /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomOutChartMode.cs	(revision 13113)
+++ /branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/ZoomOutChartMode.cs	(revision 13114)
@@ -36,13 +36,15 @@
 
     public override void HandleOnMouseUp(object sender, MouseEventArgs e) {
-      base.HandleOnMouseUp(sender, e);
-
-      switch (e.Button) {
-        case MouseButtons.Left:
-          chartControl.Chart.ZoomOut();
-          break;
-        case MouseButtons.Middle:
-          chartControl.Chart.Unzoom();
-          break;
+      try {
+        switch (e.Button) {
+          case MouseButtons.Left:
+            chartControl.Chart.ZoomOut();
+            break;
+          case MouseButtons.Middle:
+            chartControl.Chart.Unzoom();
+            break;
+        }
+      } finally {
+        base.HandleOnMouseUp(sender, e);
       }
     }
