DSF.Net/Controllers/Process/RoundLabel.xaml

(完整代码) 4KB

<UserControl
             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:DSF.Net.Controllers.Process"
             xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" x:Class="DSF.Net.Controllers.Process.RoundLabel"
             mc:Ignorable="d" 
             d:DesignHeight="56" d:DesignWidth="56">
    <UserControl.Resources>
        <Storyboard x:Key="RoundAnimate" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="grid">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:15" Value="-360"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="arc1">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:15" Value="360"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource RoundAnimate}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Viewbox>
        <Grid Height="56" Width="56">
            <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5" Width="56" Height="56">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Grid.RenderTransform>

                <ed:Arc ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="88" Stretch="None" StartAngle="-90" Width="56" StrokeThickness="2.5" Stroke="{Binding Path=ThemeColor.Light}" Opacity="0.8" Height="56"/>
                <ed:Arc ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="268" Stretch="None" StartAngle="90" Width="56" StrokeThickness="2.5" Stroke="{Binding Path=ThemeColor.Light}" Height="56"/>
            </Grid>
            <Ellipse Margin="4" Stroke="{Binding Path=ThemeColor.Light}" Opacity="0.3" Height="48" Width="48"/>
            <ed:Arc x:Name="arc1" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="118" Stretch="None" Stroke="{Binding Path=ThemeColor.Light}" Margin="4" Width="48" Height="48" RenderTransformOrigin="0.5,0.5">
                <ed:Arc.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ed:Arc.RenderTransform>
            </ed:Arc>
            <ed:Arc ArcThicknessUnit="Pixel" EndAngle="359" Stretch="None" Stroke="{Binding Path=ThemeColor.Light}" Opacity="0.3" Margin="7.75" StrokeThickness="2.5" StrokeDashArray="1 0.2" Height="40.5" Width="40.5"/>
            <ed:Arc x:Name="arc" ArcThicknessUnit="Pixel" EndAngle="120" Stretch="None" Stroke="{Binding Path=ThemeColor.Light}" Margin="7.75" StrokeThickness="2.5" StrokeDashArray="1 0.2" Width="40.5" Height="40.5"/>
            <Ellipse Margin="11.25" Stroke="{Binding Path=ThemeColor.Light}" Width="33.5" Height="33.5" StrokeThickness="0.8"/>
            <Label x:Name="label" Content="10.2%" Margin="0,13.5" Background="{x:Null}" Foreground="{Binding Path=ThemeColor.TextEnabled}" HorizontalContentAlignment="Center" FontFamily="Microsoft YaHei" VerticalContentAlignment="Center" Width="56" Height="29"/>

        </Grid>
    </Viewbox>
</UserControl>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。