You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.7 KiB
XML
30 lines
1.7 KiB
XML
<UserControl x:Class="Txgy.Controls.CircularProgressBar"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Txgy.Controls"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="150" d:DesignWidth="150">
|
|
<Grid Name="layout" Height="{Binding RelativeSource={RelativeSource Self},Path=Width}">
|
|
<Ellipse Width="{Binding ElementName=layout,Path=ActualWidth}"
|
|
Height="{Binding RelativeSource={RelativeSource Self},Path=Width}"
|
|
StrokeThickness="8"
|
|
Stroke="{Binding BackColor,RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor}}"
|
|
Name="backEllipse">
|
|
<Ellipse.Effect>
|
|
<DropShadowEffect ShadowDepth="0" Direction="0" Color="White" BlurRadius="5" />
|
|
</Ellipse.Effect>
|
|
</Ellipse>
|
|
<Path Name="path" StrokeStartLineCap="Round" StrokeEndLineCap="Round"
|
|
Stroke="{Binding ForeColor,RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor}}"
|
|
StrokeThickness="6"/>
|
|
<Viewbox Margin="14">
|
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White">
|
|
<Run FontSize="20" Text="{Binding Value,RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor}}"/>
|
|
<Run Text="%"/>
|
|
</TextBlock>
|
|
</Viewbox>
|
|
</Grid>
|
|
</UserControl>
|