title: Why when resizing the user control graph it's not really resized?
body: <p>I have a user control chart in my Form1 designer and this is the code to resize it:</p>
  
  <pre><code>private void graphChart1_MouseEnter(object sender, EventArgs e)
          {
              graphChart1.Size = new Size(600, 600);
          }
  </code></pre>
  
  <p>When I move the mouse to the control area it's not resizing it make it bigger but deleting some other controls.</p>
  
  <p>This is an image before I move the mouse over the control:</p>
  
  <p><img src="https://i.stack.imgur.com/fUefu.jpg" alt="enter image description here"></p>
  
  <p>And this is an image when I moved the mouse over the control:</p>
  
  <p><img src="https://i.stack.imgur.com/Pr4MP.jpg" alt="enter image description here"></p>
  
  <p>This is the code of the user control where the chart is:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Drawing;
  using System.Data;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Web;
  using System.Windows.Forms.DataVisualization.Charting;
  
  namespace GatherLinks
  {
  
      public partial class GraphChart : UserControl
      {
          public GraphChart()
          {
              InitializeComponent();
          }
  
          private double f(int i)
          {
              var f1 = 59894 - (8128 * i) + (262 * i * i) - (1.6 * i * i * i);
              return f1;
          }
  
          private void GraphChart_Load(object sender, EventArgs e)
          {
              chart1.Series.Clear();
              var series1 = new System.Windows.Forms.DataVisualization.Charting.Series
              {
                  Name = "Series1",
                  Color = System.Drawing.Color.Green,
                  IsVisibleInLegend = false,
                  IsXValueIndexed = true,
                  ChartType = SeriesChartType.Line
              };
  
              this.chart1.Series.Add(series1);
  
              for (int i = 0; i &lt; 100; i++)
              {
                  series1.Points.AddXY(i, f(i));
              }
              chart1.Invalidate();
          }
      }
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I did this in the user control class code:</p>
  
  <pre><code>public void ChangeChartSize(int width, int height)
  {
              chart1.Size = new Size(width, height);
              chart1.Invalidate();
  }
  </code></pre>
  
  <p>I had to add <code>chart1.Invalidate();</code> to make it to take effect but then it sized the chart it self inside the user control. The user control was not changed.</p>
  
  <p>So in the Form1 mouse enter I also changing the graphChart1 the control size:</p>
  
  <pre><code>private void graphChart1_MouseEnter(object sender, EventArgs e)
  {
              graphChart1.ChangeChartSize(600, 600);
              graphChart1.Size = new Size(600, 600);
  }
  </code></pre>
  
  <p>The problem is that now it's taking a lot of time almost 20 seconds or so until it take effect when I'm moving the mouse over the control. If I will remove the second line: </p>
  
  <pre><code>graphChart1.Size = new Size(600, 600); 
  </code></pre>
  
  <p>it will work fast but then it will change the chart only inside the control but it won't change the control size.</p>
  
  <p>Tried also with invalidate:</p>
  
  <pre><code>private void graphChart1_MouseEnter(object sender, EventArgs e)
  {
              graphChart1.ChangeChartSize(600, 600);
              graphChart1.Size = new Size(600, 600);
              graphChart1.Invalidate();
  }
  </code></pre>
  
  <p>But still very slow. Maybe I need to change the control it self size also in the user control class code and not in Form1 ?</p>