ProgressBar.IsIndeterminate 屬性

定義

取得或設定 ProgressBar 是否顯示實際值或泛型連續回應。

public:
 property bool IsIndeterminate { bool get(); void set(bool value); };
public bool IsIndeterminate { get; set; }
member this.IsIndeterminate : bool with get, set
Public Property IsIndeterminate As Boolean

屬性值

Boolean

如果 ProgressBar 顯示實際值則為 false,如果 ProgressBar 顯示泛型進度則為 true。 預設為 false

範例

下列範例會將 IsIndeterminate 屬性設定為 true ,以建立 ProgressBar 顯示泛型進度的 。

ProgressBar progbar = new ProgressBar();
progbar.Background = Brushes.Gray;
progbar.Foreground = Brushes.Red;
progbar.Width = 150;
progbar.Height = 15;
progbar.IsIndeterminate = true;
Dim progbar As New ProgressBar()
progbar.Background = Brushes.Gray
progbar.Foreground = Brushes.Red
progbar.Width = 150
progbar.Height = 15
progbar.IsIndeterminate = True

備註

當這個屬性為 true 時,會 ProgressBar 以連續的方式動畫顯示一些橫條移動 ProgressBar ,並忽略 Value 屬性。

相依性屬性資訊

識別碼欄位 IsIndeterminateProperty
設定為 的中繼資料屬性 true

適用於