Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to configure Linear Gauge to automatically fill all available space even if control width exceeds height significantly

$
0
0

The default Linear Gauge has 1:2 size proportion: Coordinate System. This means that you are not able to resize it wider in automatic mode. If you simplify the gauge layout (e.g. remove  Background Layer) and enable the AutoSize Property, the gauge proportion will be recalculated automatically based on the current gauge layout. The following gauge has 1:4 height to width proportion. 



This example demonstrates how to scale the gauge horizontally to achieve the following result:



To accomplish this task, it is necessary to disable the AutoSize Property and calculate Bounds manually to correctly align the gauge inside GaugeControl. In addition, set StartPoint and EndPoint manually to stretch the scale. 
Note that in the attached example, two constants are used "gaugeScaleProportion" and "markerSizeProportion". It is necessary to calculate them manually by making the default gauge screenshot. 


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>