<StackPanel x:Name="LayoutRoot" Background="White"> <Border BorderThickness="5"BorderBrush="Black"> <StackPanel Background="LightGray"> <TextBlock HorizontalAlignment="Center"Margin="10" Text="Value-Based Progress Bar" /> <ProgressBar x:Name="pg1" Value="100" Margin="10"Maximum="200" Height="15" IsIndeterminate="False" /> </StackPanel> </Border> <BorderBorderThickness="5" BorderBrush="Black"> <StackPanel Background="LightGray"> <TextBlockHorizontalAlignment="Center" Margin="10" Text="Indeterminate Progress Bar" /> <ProgressBarx:Name="pg2" Margin="10" Height="15" IsIndeterminate="True" /> </StackPanel> </Border></StackPanel>
ProgressBar 控件以两种样式之一直观地指示较长操作的进度。
-
显示重复模式的条,即不断出现省略号的模式。( IsIndeterminate="True" )
-
基于值进行填充的条。(IsIndeterminate="False" )