finish create module form
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<UserControl x:Class="Server_Dashboard.Controls.HalfRoundProgressBar.HalfRoundProgressBar"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
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"/>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle" />
|
||||
</UserControl.Resources>
|
||||
<!--Progress bar but just half round-->
|
||||
<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=Value}" Fill="{Binding ElementName=_this, Path=IndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}"/>
|
||||
<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=Value}" Fill="{Binding ElementName=_this, Path=IndicatorBrush}" Stretch="None" StartAngle="0" />
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,13 +13,15 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
/// <summary>
|
||||
/// Dependency Properties
|
||||
/// </summary>
|
||||
public partial class HalfRoundProgressBar : UserControl {
|
||||
|
||||
|
||||
//Indicator Brush Property
|
||||
public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush IndicatorBrush {
|
||||
get { return (Brush)GetValue(IndicatorBrushProperty); }
|
||||
set { SetValue(IndicatorBrushProperty, value); }
|
||||
@@ -27,6 +29,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//Background Brush Property
|
||||
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush BackgroundBrush {
|
||||
get { return (Brush)GetValue(BackgroundBrushProperty); }
|
||||
set { SetValue(BackgroundBrushProperty, value); }
|
||||
@@ -34,6 +37,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//ProgressBorder Property
|
||||
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush ProgressBorderBrush {
|
||||
get { return (Brush)GetValue(ProgressBorderBrushProperty); }
|
||||
set { SetValue(ProgressBorderBrushProperty, value); }
|
||||
@@ -41,6 +45,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//Value
|
||||
public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(HalfRoundProgressBar));
|
||||
|
||||
public int Value {
|
||||
get { return (int)GetValue(ValueProperty); }
|
||||
set { SetValue(ValueProperty, value); }
|
||||
@@ -50,4 +55,4 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user