67 lines
2.4 KiB
XML
67 lines
2.4 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="SPTInstaller.CustomControls.PreCheckItem">
|
|
|
|
<UserControl.Styles>
|
|
<Style Selector="Arc.running">
|
|
<Setter Property="Stroke" Value="DodgerBlue"/>
|
|
</Style>
|
|
|
|
<Style Selector="Arc">
|
|
<Setter Property="Stroke" Value="Gray"/>
|
|
<Setter Property="IsVisible" Value="{Binding IsPending, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
|
<Style.Animations>
|
|
<Animation Duration="0:0:1" RepeatCount="infinite">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="RotateTransform.Angle" Value="0"/>
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%">
|
|
<Setter Property="RotateTransform.Angle" Value="360"/>
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
|
|
<Style Selector="Label.bold">
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</Style>
|
|
</UserControl.Styles>
|
|
|
|
|
|
<Grid ColumnDefinitions="22, AUTO" Margin="3">
|
|
<Canvas Margin="0 3 0 0"
|
|
IsVisible="{Binding !IsPending, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
|
<Ellipse Fill="White" Height="15" Width="15" Canvas.Top="3" Canvas.Left="3"
|
|
/>
|
|
<Path Name="iconPath" StrokeThickness="2"
|
|
Classes.passed="{Binding Passed, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
>
|
|
<Classes.failed>
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
<Binding Path="IsRequired"/>
|
|
<Binding Path="!Passed"/>
|
|
</MultiBinding>
|
|
</Classes.failed>
|
|
<Classes.warning>
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
<Binding Path="!IsRequired"/>
|
|
<Binding Path="!Passed"/>
|
|
</MultiBinding>
|
|
</Classes.warning>
|
|
</Path>
|
|
</Canvas>
|
|
|
|
<Arc StartAngle="280" SweepAngle="80" Margin="0 3 0 0" StrokeThickness="3"
|
|
Width="20" Height="20" VerticalAlignment="Top"
|
|
Classes.running="{Binding IsRunning, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
/>
|
|
<Label Grid.Column="1"
|
|
Content="{Binding PreCheckName, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Classes.bold="{Binding IsRunning, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
/>
|
|
</Grid>
|
|
</UserControl>
|