I want to create a progress bar from two images (empty and filled), if value is set to 30, there is image combined from 30% filled and 70% empty etc.
That's my current code
<ProgressBar Value="30" Height="30" Width="230"
BorderThickness="0"
HorizontalAlignment="Center"
Foreground="#0A8098" Maximum="100"
BorderBrush="Transparent" Name="ProgressBar" Margin="137,0,147,0" >
<ProgressBar.Template>
<ControlTemplate>
<Grid>
<Image Name="PART_Track" Source="Resources/emptybar.png" Stretch="Fill"/>
<Rectangle Name="PART_Indicator" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="Resources/filledbar.png" Stretch="UniformToFill"/>
</Rectangle.Fill>
</Rectangle>
</Grid>
</ControlTemplate>
</ProgressBar.Template>
</ProgressBar>
Here is how it's work, and here is how I want it to work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…