ProgressBar.Orientation Property

 

Gets or sets the orientation of a ProgressBar: horizontal or vertical.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

Public Property Orientation As Orientation

Property Value

Type: System.Windows.Controls.Orientation

One of the Orientation values. The default is Horizontal.

The following example which creates a ProgressBar shows how to use the Orientation property to make a horizontal bar.

Dim progbar As New ProgressBar()
progbar.IsIndeterminate = False
progbar.Orientation = Orientation.Horizontal
progbar.Width = 150
progbar.Height = 15
Dim duration As New Duration(TimeSpan.FromSeconds(10))
Dim doubleanimation As New DoubleAnimation(100.0, duration)
progbar.BeginAnimation(ProgressBar.ValueProperty, doubleanimation)

.NET Framework
Available since 3.0
Return to top
Show: