Skip to main content
A newer version of this page is available. .

SymbolLength.Type Property

Returns the type of the SymbolLength object.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Gauges, DevExpress.Wpf.Gauges

Declaration

public readonly SymbolLengthType Type { get; }

Property Value

Type Description
SymbolLengthType

A SymbolLengthType enumeration value that specifies is the type of the SymbolLength object.

Available values:

Name Description
Auto

A symbol has a predefined length (width and height) according to the view type of the current symbols panel.

Stretch

A symbol is stretched to fill the entire symbols panel. Note that the height to width proportion will not be preserved in this case.

Fixed

A symbol length is specified in absolute values.

Proportional

A symbol is zoomed proportionally to fill the entire symbols panel.

Example

This example demonstrates how to specify the width and height of digital gauge symbols in fixed and proportional values.

For this, it is necessary to create an instance of the SymbolLength structure with required values and then assign it to the SymbolViewBase.Height and SymbolViewBase.Width properties.

In this example, the symbol length can be set either in fixed or proportional values depending on which of the buttons has been clicked.

View Example

// Specify fixed values for symbol height and width.
SymbolLength newWidth = new SymbolLength(SymbolLengthType.Fixed, 44);
matrixView.Width = newWidth;
SymbolLength newHeight = new SymbolLength(SymbolLengthType.Fixed, 50);
matrixView.Height = newHeight;
// Specify proportional values for symbol height and width.
SymbolLength newWidth = new SymbolLength(SymbolLengthType.Proportional, 2);
matrixView.Width = newWidth;
SymbolLength newHeight = new SymbolLength(SymbolLengthType.Proportional, 5);
matrixView.Height = newHeight;
See Also