Читати англійською Редагувати

Поділитися через


ProgressBar.Orientation Property

Definition

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

C#
public System.Windows.Controls.Orientation Orientation { get; set; }

Property Value

One of the Orientation values. The default is Horizontal.

Examples

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

C#
ProgressBar progbar = new ProgressBar();
progbar.IsIndeterminate = false;
progbar.Orientation = Orientation.Horizontal;
progbar.Width = 150;
progbar.Height = 15;
Duration duration = new Duration(TimeSpan.FromSeconds(10));
DoubleAnimation doubleanimation = new DoubleAnimation(100.0, duration);
progbar.BeginAnimation(ProgressBar.ValueProperty, doubleanimation);

Remarks

Dependency Property Information

Item Value
Identifier field OrientationProperty
Metadata properties set to true AffectsMeasure

Applies to

Продукт Версії
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10