バージョン

Orientation プロパティ (UltraProgressBar)

UltraProgressBar の配置方向を決定します。
シンタックス
'宣言
 
Public Property Orientation As Orientation
public Orientation Orientation {get; set;}
解説

UltraProgressBar の方向は水平または垂直にできます。水平に描画するとき、パーセントが増えるにしたがって、塗りつぶしは左から右に増えます。垂直に描画するとき、パーセントが増えるにしたがって、塗りつぶしは下から上に増えます。Orientation のデフォルト値は水平です。

使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinProgressBar

Private Sub InitializeProgessBar()

    With Me.ultraProgressBar1

        ' Note: Under Windows XP if the 'SupportThemes' property
        ' is left set to True (its default setting) then some of
        ' the explicit appearance and border style property
        ' settings are ignored.
        .SupportThemes = False

        ' Set the appearance of the status bar control
        ' to use a gradient.
        .Appearance.BackColor = Color.Gray
        .Appearance.BackColor2 = Color.White
        .Appearance.BackGradientStyle = GradientStyle.HorizontalBump
        .Appearance.ForeColor = Color.Red

        ' Set the appearance for the 'fill' area of the
        ' status bar control to use a different gradient.
        .FillAppearance.BackColor = Color.Blue
        .FillAppearance.BackColor2 = Color.White
        .FillAppearance.BackGradientStyle = GradientStyle.HorizontalBump
        .FillAppearance.ForeColor = Color.Red

        ' Set the border style for the control
        .BorderStyle = UIElementBorderStyle.Etched

        ' Set the minimum, maximum, and value properties.
        ' For the case below where the minimum value is 45,
        ' the maximum is 85 and the value is 55, the status
        ' bar would display 25%. This is because the entire
        ' range is 40 (85 - 45) and the relative value is 10
        ' (55 - 45).
        .Minimum = 45
        .Maximum = 85
        .Value = 55

        ' Set the amount to increment the value when
        ' the 'PerformStep' method is called.
        .Step = 5

        ' Set the orientation of the control.
        .Orientation = Orientation.Vertical

        ' Set a percent format. The default format is
        ' "P0" which shows only the percent integer
        ' value. The "P1" setting below will format
        ' the percentage with place after the decimal
        ' point (e.g.. "34.5%").
        .PercentFormat = "P1"

        ' Set the 'text' property to a string that
        ' contains some substitution strings. The
        ' code below will cause the progress bar's
        ' to display its value like the following:
        ' "Done: 34.4, remaining"
        Dim sb As New System.Text.StringBuilder()

        ' Note: There are 10 different substitution string
        ' constants defined on UltraProgressBar. They are
        ' prefixed with 'LABEL_'.
        '
        ' The LABEL_FORMATTED substitution string
        ' will cause the formatted percent completed
        ' value to be substitued here.
        sb.Append("Done: ")
        sb.Append(UltraProgressBar.LABEL_FORMATTED)

        ' The LABEL_FORMATTED_REMAINING substitution 
        ' string will cause the formatted percent 
        ' remaining value to be substitued here.
        sb.Append(", remaining: ")
        sb.Append(UltraProgressBar.LABEL_FORMATTED_REMAINING)

        ' Set the 'Text' property of the control.
        ' Note: this corresponds to the 'Label' property
        ' on the IProgressBarInfo interface.
        .Text = sb.ToString()

        ' Set the style of the progress bar to show a
        ' segmented fill.  
        .Style = ProgressBarStyle.SegmentedPartial

        ' Set the width of each segement. If the default 
        ' value of -1 is kept the control will calculate
        ' a reasonable default segment width based on
        ' the progress bar control's width and height.
        .SegmentWidth = 6

        ' Set the TextVisible property. The default
        ' value is true so the line below isn't
        ' required.
        ' Note: this corresponds to the 'ShowLabel' 
        ' property on the IProgressBarInfo interface.
        .TextVisible = True

    End With

End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinProgressBar;

private void InitializeProgressBar()
{

	UltraProgressBar pbar = this.ultraProgressBar1;

	// Note: Under Windows XP if the 'SupportThemes' property
	// is left set to True (its default setting) then some of
	// the explicit appearance and border style property
	// settings are ignored.
	pbar.SupportThemes = false;

	// Set the appearance of the status bar control
	// to use a gradient.
	pbar.Appearance.BackColor = Color.Gray;
	pbar.Appearance.BackColor2 = Color.White;
	pbar.Appearance.BackGradientStyle = GradientStyle.HorizontalBump;
	pbar.Appearance.ForeColor = Color.Red;

	// Set the appearance for the 'fill' area of the
	// status bar control to use a different gradient.
	pbar.FillAppearance.BackColor = Color.Blue;
	pbar.FillAppearance.BackColor2 = Color.White;
	pbar.FillAppearance.BackGradientStyle = GradientStyle.HorizontalBump;
	pbar.FillAppearance.ForeColor = Color.Red;
	
	// Set the border style for the control
	pbar.BorderStyle = UIElementBorderStyle.Etched;

	// Set the minimum, maximum, and value properties.
	// For the case below where the minimum value is 45,
	// the maximum is 85 and the value is 55, the status
	// bar would display 25%. This is because the entire
	// range is 40 (85 - 45) and the relative value is 10
	// (55 - 45).
	pbar.Minimum = 45;
	pbar.Maximum = 85;
	pbar.Value = 55;

	// Set the amount to increment the value when
	// the 'PerformStep' method is called.
	pbar.Step = 5;

	// Set the orientation of the control.
	pbar.Orientation = Orientation.Vertical;
	
	// Set a percent format. The default format is
	// "P0" which shows only the percent integer
	// value. The "P1" setting below will format
	// the percentage with place after the decimal
	// point (e.g.. "34.5%").
	pbar.PercentFormat = "P1";

	// Set the 'text' property to a string that
	// contains some substitution strings. The
	// code below will cause the progress bar's
	// to display its value like the following:
	// "Done: 34.4, remaining"
	System.Text.StringBuilder sb = new System.Text.StringBuilder();
	
	// Note: There are 10 different substitution string
	// constants defined on UltraProgressBar. They are
	// prefixed with 'LABEL_'.
	//
	// The LABEL_FORMATTED substitution string
	// will cause the formatted percent completed
	// value to be substitued here.
	sb.Append( "Done: ");
	sb.Append( UltraProgressBar.LABEL_FORMATTED );
	
	// The LABEL_FORMATTED_REMAINING substitution 
	// string will cause the formatted percent 
	// remaining value to be substitued here.
	sb.Append( ", remaining: ");
	sb.Append( UltraProgressBar.LABEL_FORMATTED_REMAINING );

	// Set the 'Text' property of the control.
	// Note: this corresponds to the 'Label' property
	// on the IProgressBarInfo interface.
	pbar.Text = sb.ToString();
	
	// Set the style of the progress bar to show a
	// segmented fill.  
	pbar.Style = ProgressBarStyle.SegmentedPartial;

	// Set the width of each segement. If the default 
	// value of -1 is kept the control will calculate
	// a reasonable default segment width based on
	// the progress bar control's width and height.
	pbar.SegmentWidth = 6;

	// Set the TextVisible property. The default
	// value is true so the line below isn't
	// required.
	// Note: this corresponds to the 'ShowLabel' 
	// property on the IProgressBarInfo interface.
	pbar.TextVisible = true;

}
参照