Skip to content

DevExpress-Examples/winforms-linear-gauge-custom-aspect-ratio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Gauge - Configure linear gauge to fill the entire space if the width is significantly greater than the height

The Linear Gauge has an aspect ratio of 1:2 (Coordinate System). You cannot make the Linear Gauge wider in automatic mode. If you simplify the gauge layout (for example, remove the Background Layer) and enable the AutoSize option, the aspect ratio will be recalculated based on the gauge layout.

The following gauge has a 1:4 aspect ratio:

WinForms Linear Gauge

This example demonstrates how to scale the linear gauge horizontally:

WinForms Linear Gauge with Custom Aspect Ratio

Implementation Details

  • Disable the AutoSize option.
  • Calculate Bounds to align the linear gauge inside the Gauge Control.
  • Specify StartPoint and EndPoint properties to stretch the scale.

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)