Performance in Windows Forms Smith Chart (SfSmithChart)

29 Apr 20212 minutes to read

The performance of the SfSmithChart can be improved by using the following methods.

Begin update and end update

Encapsulate your “data points” adding code within BeginUpdate and EndUpdate method which allows you to stop the continuous update of control and resume it finally.

SfSmithChart performance Methods Description
BeginUpdate Calling this method will stop the painting of the control.
EndUpdate Resumes the painting of the control suspended by BeginUpdate method.

   //Add more points here
   LineSeries lineSeries = sfSmithChart.Series[0] as LineSeries;
   Random random = new Random();
   for (int i = 0; i < 100; i++)
      double val = random.Next(0, 5);
      double val1 = random.Next(-5, 5);
      lineSeries.Points.Add(val, val1);


    ' Add more points here
    Dim lineSeries As LineSeries = TryCast(sfSmithChart.Series(0), LineSeries)
    Dim random As Random = New Random()

    For i As Integer = 0 To 100 - 1
        Dim val As Double = random.[Next](0, 5)
        Dim val1 As Double = random.[Next](-5, 5)
        lineSeries.Points.Add(val, val1)