Back to Devexpress

TrackBarControl.Value Property

windowsforms-devexpress-dot-xtraeditors-dot-trackbarcontrol.md

latest3.5 KB
Original Source

TrackBarControl.Value Property

Gets or sets the editor’s value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Behavior")]
[Bindable(true)]
public int Value { get; set; }
vb
<DXCategory("Behavior")>
<Bindable(True)>
Public Property Value As Integer

Property Value

TypeDescription
Int32

An integer value that specifies the editor’s value.

|

Remarks

The Value property is nothing but an integer representation of the TrackBarControl.EditValue property’s value.

Changing the Value property’s value at runtime raises the BaseEdit.EditValueChanging event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Value 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-richedit-layout-api/CS/Form1.cs#L56

csharp
{
    richEditControl1.ActiveView.ZoomFactor = trackBarControl1.Value / 100f;
}

winforms-mvvm-best-practices/VB/DataBindingCapabilitiesConverters/DataBindingViaDefaultConvertersFluentAPIUserControl.vb#L36

vb
' Binding two integer properties - 'Value' and 'Progress'. No conversion needed
fluent.SetBinding(trackBar, Function(t) t.Value, Function(x) x.Progress)
' Binding the string 'Text' property to the integer 'Progress'. Values are automatically converted to/from an appropriate type.

winforms-richedit-layout-api/VB/Form1.vb#L45

vb
Private Sub trackBarControl1_EditValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles trackBarControl1.EditValueChanged
    richEditControl1.ActiveView.ZoomFactor = trackBarControl1.Value / 100F
End Sub

See Also

EditValue

EditValueChanging

ValueChanged

TrackBarControl Class

TrackBarControl Members

DevExpress.XtraEditors Namespace