Files
Server-Dashboard/Server Dashboard/Controls/DoubleRoundProgressBar/DoubleRoundProgressBar.xaml
2021-08-05 15:29:27 +02:00

95 lines
3.1 KiB
XML

<UserControl x:Class="Server_Dashboard.Controls.DoubleRoundProgressBar.DoubleRoundProgressBar"
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:Server_Dashboard.Controls.DoubleRoundProgressBar"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
xmlns:root="clr-namespace:Server_Dashboard"
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="50" d:DesignWidth="50">
<UserControl.Resources>
<root:ValueToAngleConverter x:Key="valueToAngle"/>
</UserControl.Resources>
<Grid>
<Ellipse
x:Name="Background"
Fill="{Binding
ElementName=_this,
Path=BackgroundBrush
}"
Margin="0"
Stroke="{Binding
ElementName=_this,
Path=BackgroundBrush
}"
/>
<ed:Arc
ArcThickness="8"
ArcThicknessUnit="Pixel"
EndAngle="{Binding
Converter={StaticResource valueToAngle},
ElementName=_this,
Path=ValueRead
}"
Fill="{Binding
ElementName=_this,
Path=ReadIndicatorBrush
}"
Stretch="None"
StartAngle="0"
/>
<Ellipse
x:Name="Seperator"
Fill="Transparent"
Margin="7"
Stroke="{Binding
ElementName=_this,
Path=ProgressBorderBrush
}"
Panel.ZIndex="1"
/>
<Ellipse
x:Name="Seperator2"
Fill="Transparent"
Margin="8"
Stroke="{Binding
ElementName=_this,
Path=ProgressBorderBrush
}"
Panel.ZIndex="1"
/>
<ed:Arc
Margin="8"
ArcThickness="8"
ArcThicknessUnit="Pixel"
EndAngle="{Binding
Converter={StaticResource valueToAngle},
ElementName=_this,
Path=ValueWrite
}"
Fill="{Binding
ElementName=_this,
Path=WriteIndicatorBrush
}"
Stretch="None"
StartAngle="0"
/>
<Ellipse
x:Name="Border"
Fill="{Binding
ElementName=_this,
Path=ProgressBorderBrush
}"
Margin="16"
Stroke="{Binding
ElementName=_this,
Path=ProgressBorderBrush
}"
/>
</Grid>
</UserControl>