Back to Devexpress

SymbolLengthType Enum

wpf-devexpress-dot-xpf-dot-gauges-75a5d9ba.md

latest4.0 KB
Original Source

SymbolLengthType Enum

Contains the values used to specify the symbol length (either width or height) for the current symbol view appearance on a digital gauge control.

Namespace : DevExpress.Xpf.Gauges

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

NuGet Package : DevExpress.Wpf.Gauges

Declaration

csharp
public enum SymbolLengthType
vb
Public Enum SymbolLengthType

Members

NameDescription
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.

|

The following properties accept/return SymbolLengthType values:

Remarks

The values listed by the SymbolLengthType enumerator are used to set the SymbolLength.Type property.

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: Set the Width and Height of Symbols in the Digital Gauge Control

csharp
private void button1_Click(object sender, RoutedEventArgs e) {
    // Specify fixed values for symbol height and width.
    matrixView.Width = new SymbolLength(SymbolLengthType.Fixed, 44);
    matrixView.Height = new SymbolLength(SymbolLengthType.Fixed, 50);
}

private void button2_Click(object sender, RoutedEventArgs e) {
    // Specify proportional values for symbol height and width.
    matrixView.Width = new SymbolLength(SymbolLengthType.Proportional, 2);
    matrixView.Height = new SymbolLength(SymbolLengthType.Proportional, 5);
}
vb
Private Sub button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Specify fixed values for symbol height and width.
    matrixView.Width = New SymbolLength(SymbolLengthType.Fixed, 44)
    matrixView.Height = New SymbolLength(SymbolLengthType.Fixed, 50)
End Sub

Private Sub button2_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Specify proportional values for symbol height and width.
    matrixView.Width = New SymbolLength(SymbolLengthType.Proportional, 2)
    matrixView.Height = New SymbolLength(SymbolLengthType.Proportional, 5)
End Sub

See Also

DevExpress.Xpf.Gauges Namespace