Aerosol Posted January 5, 2015 Report Posted January 5, 2015 This is a simple progressbar which will show the percentage. It will change the text color according to the progress color.IntroductionThis is a basic WPF progress bar control. It looks like XP style progressbar which will show the progress value and text.WPF progressbar doesn't show the progress text. I have a project which needs to show the progress value to the user. So I decided to develop a ProgressBar which will show the progress value on the progressbar.<Style x:Key="{x:Type local:YagnaProgressBar}" TargetType="{x:Type local:YagnaProgressBar}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:YagnaProgressBar}"> <Grid x:Name="PART_ProgressbarGrid" Background="Transparent"> <Canvas x:Name="PART_ProgressBarCanvas" Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> <TextBox x:Name="PART_ProgressBarBorder" Background="Green" IsReadOnly="True" Canvas.Left="0" Canvas.Top="0" IsEnabled="False"/> <Border x:Name="PART_ProgressBarRectangle" Background="Blue" BorderThickness="0" Canvas.Left="0" Canvas.Top="0"/> <TextBlock x:Name="PART_ProgressBarWhiteText" Text="0%" FontFamily="Arial" FontSize="12" Foreground="Blue" Background="Transparent" Canvas.Left="0" Canvas.Top="0" VerticalAlignment="Center"/> </Canvas> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>Points of InterestI am new to WPF. I found it very interesting.History4th January, 2015: Initial versionSource Quote