我需要进度条,它会在定期间隔后显示点后跟图标。 我正在使用相机模块,当拍摄快照时,我需要在进度条中显示点,这表示拍摄了快照。 然后这个快照被传递给algorthim并且它返回了boolen值,然后我需要显示图标。
如果持续时间为1分钟且间隔为30秒,则在进度条控件中我需要在进度条中显示两个点和两个图标。
请给我一些解决方案,下面是XAMl
XAML对于进度条
<Window.Resources>
<Style x:Key="ProgressBarStyle" TargetType="ProgressBar">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Border BorderBrush="#BBC6C4" BorderThickness="1" CornerRadius="5" Padding="1">
<Grid x:Name="PART_Track" >
<Rectangle x:Name="PART_Indicator" HorizontalAlignment="Left" RadiusX="5" RadiusY="5">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF1D5666" Offset="1"/>
<GradientStop Color="#FF09B6FF"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Ellipse x:Name="progressdot" HorizontalAlignment="Left" Margin="73,7,0,0" Stroke="#FFA8A49B" Width="8" Height="8"
VerticalAlignment="Top" Grid.Row="1" />
<Image x:Name="imgAcetowhiteness" Margin="89,7,0,0" Source="..\acetowhiteness.png"
Stretch="Fill" Width="15" Height="15" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Ellipse x:Name="progressdot1" HorizontalAlignment="Left" Margin="180,7,0,0" Stroke="#FFA8A49B" Width="8" Height="8"
VerticalAlignment="Top" Grid.Row="1" />
<Image x:Name="imgAcetowhiteness1" Margin="195,7,0,0" Source="..\acetowhiteness.png"
Stretch="Fill" Width="15" Height="15" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<StackPanel Orientation="Vertical">
<ProgressBar x:Name="PBarone" Margin="48,10,10,10" Style="{StaticResource ProgressBarStyle}"/>
<ProgressBar x:Name="PBartwo" Margin="48,20,10,10" Style="{StaticResource ProgressBarStyle}"/>
<ProgressBar x:Name="PBarthree" Margin="48,30,10,10" Style="{StaticResource ProgressBarStyle}"/>
</StackPanel>
</Grid>