ProgressBar.Orientation Property

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

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Property Orientation As Orientation
<object Orientation="Orientation" .../>

Property Value

Type: System.Windows.Controls.Orientation
One of the Orientation values. The default is Horizontal.

Identifier field

OrientationProperty

Metadata properties set to true

AffectsMeasure

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft