mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-02 15:50:49 +08:00
Update ProgressBar.axaml
using progress bar's BorderThickness property to control Arc's StrokeThickness property.
This commit is contained in:
@@ -344,6 +344,7 @@
|
||||
<ControlTheme x:Key="ProgressRing" TargetType="ProgressBar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarIndicatorBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ProgressBarBackground}" />
|
||||
<Setter Property="BorderThickness" Value="6" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ProgressBar">
|
||||
<Panel>
|
||||
@@ -355,7 +356,7 @@
|
||||
Stroke="{TemplateBinding Background}"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="6"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="360" />
|
||||
<Arc
|
||||
Name="Indicator"
|
||||
@@ -364,7 +365,7 @@
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="6"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<Arc
|
||||
@@ -375,7 +376,7 @@
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="6"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<TextBlock
|
||||
@@ -443,4 +444,4 @@
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user