Category / Section
How to reduce the size of the WinForms LinearGauge?
1 min read
Reduce the size of LinearGauge
You can reduce the size of the LinearGauge by specifying the required size as the Minimum size of the LinearGauge. By default, LinearGauge is initialized with the minimum size.
C#
//Initializes MinimumSize for LinearGauge. this.linearGauge1.MinimumSize = new Size(0, 0); //Sets the required size of the LinearGauge. this.linearGauge1.Size = new Size((int)this.integerTextBox1.IntegerValue, (int)this.integerTextBox2.IntegerValue);
VB
'Initializes MinimumSize for LinearGauge. Me.linearGauge1.MinimumSize = New Size(0, 0) 'Sets the required size of the LinearGauge. Me.linearGauge1.Size = New Size(CInt(Fix(Me.integerTextBox1.IntegerValue)), CInt(Fix(Me.integerTextBox2.IntegerValue)))
Note:
The “MinimumSize” property helps to specify the lower limit of the Linear Gauge.
Figure 1: Linear Gauge with specified size
Figure 2: Default Size of Linear Gauge
Figure 3: Linear Gauge with Minimum size specified
Samples:
Reference link: https://help.syncfusion.com/windowsforms/radial-gauge/linear-gauge