バージョン

ProgressBarInfo クラス

UltraStatusPanel.Style パネルの ProgressBar 設定を表します。
シンタックス
'宣言
 
Public Class ProgressBarInfo 
   Inherits Infragistics.Shared.SubObjectBase
   Implements Infragistics.Win.UltraWinProgressBar.IProgressBarInfo 
public class ProgressBarInfo : Infragistics.Shared.SubObjectBase, Infragistics.Win.UltraWinProgressBar.IProgressBarInfo  
解説

ProgressBarInfo は、進捗状況バーのスタイル パネルを描画する時に使用される情報を保持します。Minimum および Maximum 値は範囲を決定し、Value は塗りつぶされて表示される進捗状況バーのパーセントを決定するために使用されます。FillAppearance は、プログレス バーの塗り潰し領域の外観を決定するために使用します。

Label は、ShowLabel プロパティを使用して非表示にすることもできます。Label プロパティは、置き換え可能な値をサポートします。完全なリストについては、Infragistics.Win.UltraWinProgressBar.UltraProgressBar.Text プロパティを参照してください。

Infragistics.Win.UltraControlBase.SupportThemes が True に設定され、オペレーティングが XP テーマをサポートし、テーマが有効であれば、進捗状況バーはシステム テーマを使用して描画されます。システム テーマを使用して描画する場合、外観プロパティは進捗状況バーの背景の外観に影響を及ぼしません。

FillAppearance の文字を揃えたりフォントを指定するプロパティは無視されます。Appearance のプロパティの値と一致する必要があるからです。これらの値を変更するには、Appearance で対応するプロパティを設定します。

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

Private Sub button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click

    Dim panel As UltraStatusPanel
    Dim pbi As ProgressBarInfo

    ' Note: Under windows XP if the 'SupportThemes' property
    ' is left set to True (its default setting) then some of
    ' the appearance settings are ignored.
    Me.ultraStatusBar1.SupportThemes = False

    ' Add a progress style panel to the status bar. 
    Panel = Me.ultraStatusBar1.Panels.Add("Pgrss", PanelStyle.Progress)

    ' Set the index of the panel so that it is the first 
    ' visible panel 
    Panel.Index = 0

    ' Set the width of the panel	
    panel.Width = 200

    ' Get the 'ProgressBarInfo' object from the panel.
    ' Note: This has meaning only for panels with a 
    ' 'Style' of 'PanelStyle.Progress'.
    pbi = Panel.ProgressBarInfo

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

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

    ' 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).
    pbi.Minimum = 45
    pbi.Maximum = 85
    pbi.Value = 55

    ' 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%").
    pbi.PercentFormat = "P1"

    ' Set the 'Label' property to a string that
    ' contains some substitution strings. The
    ' code below will cause the panel to display
    ' its value formatted 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 'Label' property of the control.
    pbi.Label = sb.ToString()

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

    ' Set the ShowLabel property. The default
    ' value is true so the line below isn't
    ' required.
    pbi.ShowLabel = True

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

private void button3_Click(object sender, System.EventArgs e)
{

	UltraStatusPanel panel;
	ProgressBarInfo pbi;

	// Note: Under windows XP if the 'SupportThemes' property
	// is left set to True (its default setting) then some of
	// the appearance settings are ignored.
	this.ultraStatusBar1.SupportThemes = false;
	
	// Add a progress style panel to the status bar. 
	panel = this.ultraStatusBar1.Panels.Add("Pgrss", PanelStyle.Progress );
		
	// Set the index of the panel so that it is the first 
	// visible panel 
	panel.Index = 0;

	// Set the width of the panel	
	panel.Width = 200;

	// Get the 'ProgressBarInfo' object from the panel.
	// Note: This has meaning only for panels with a 
	// 'Style' of 'PanelStyle.Progress'.
	pbi = panel.ProgressBarInfo;

	// Set the appearance of the status bar control
	// to use a gradient.
	pbi.Appearance.BackColor = Color.Gray;
	pbi.Appearance.BackColor2 = Color.White;
	pbi.Appearance.BackGradientStyle = GradientStyle.VerticalBump;
	pbi.Appearance.ForeColor = Color.Red;
	pbi.Appearance.TextHAlign = HAlign.Right;

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

	// 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).
	pbi.Minimum = 45;
	pbi.Maximum = 85;
	pbi.Value = 55;
	
	// 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%").
	pbi.PercentFormat = "P1";

	// Set the 'Label' property to a string that
	// contains some substitution strings. The
	// code below will cause the panel to display
	// its value formatted 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 'Label' property of the control.
	pbi.Label = sb.ToString();
	
	// Set the style of the progress bar to show a
	// segmented fill.  
	pbi.Style = ProgressBarStyle.SegmentedPartial;

	// Set the ShowLabel property. The default
	// value is true so the line below isn't
	// required.
	pbi.ShowLabel = true;

}
参照