corelibraries-devexpress-dot-xtragauges-dot-core-dot-model-dot-basegauge-eaa579f9.md
Gets or sets the gauge’s bounds.
Namespace : DevExpress.XtraGauges.Core.Model
Assembly : DevExpress.XtraGauges.v25.2.Core.dll
NuGet Package : DevExpress.Gauges.Core
public Rectangle Bounds { get; set; }
Public Property Bounds As Rectangle
| Type | Description |
|---|---|
| Rectangle |
A Rectangle that specifies the gauge’s bounds.
|
The gauge’s bounds cannot be less than the bounds specified by the BaseGauge.MinimumSize property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Bounds property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-linear-gauge-custom-aspect-ratio/CS/WindowsFormsApplication1/Form1.cs#L38
float proportion = Math.Max(1f, ((targetArea.Width / scaleProportion.Width) / (targetArea.Height / scaleProportion.Height)));
gauge.Bounds = new Rectangle((int)indentX, (int)(indentY + (targetArea.Height - targetArea.Width / 2f / proportion) / 2f), (int)targetArea.Width, (int)(targetArea.Width / 2f / proportion));
gauge.Scales[0].StartPoint = new PointF2D(62.5f, 125f * (1f + proportion));
winforms-linear-gauge-custom-aspect-ratio/VB/WindowsFormsApplication1/Form1.vb#L31
Dim proportion As Single = Math.Max(1F, targetArea.Width / scaleProportion.Width / (targetArea.Height / scaleProportion.Height))
gauge.Bounds = New Rectangle(CInt(indentX), CInt(indentY + (targetArea.Height - targetArea.Width / 2F / proportion) / 2F), CInt(targetArea.Width), CInt(targetArea.Width / 2F / proportion))
gauge.Scales(0).StartPoint = New PointF2D(62.5F, 125F * (1F + proportion))
See Also