2023-07-25 22:07:48 -04:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
2023-05-11 23:11:39 -04:00
|
|
|
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"
|
2023-08-25 19:09:36 -04:00
|
|
|
xmlns:cc="using:SPTInstaller.CustomControls"
|
|
|
|
xmlns:convt="using:SPTInstaller.Converters"
|
2023-05-11 23:11:39 -04:00
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
2024-05-01 10:31:55 -04:00
|
|
|
x:Class="SPTInstaller.CustomControls.PreCheckItem">
|
2023-08-25 19:09:36 -04:00
|
|
|
|
|
|
|
<UserControl.Resources>
|
2024-05-01 10:31:55 -04:00
|
|
|
<convt:StatusSpinnerIsStateConverter x:Key="IsStateConverter" />
|
2023-08-25 19:09:36 -04:00
|
|
|
</UserControl.Resources>
|
2024-05-01 10:31:55 -04:00
|
|
|
<UserControl.Styles>
|
|
|
|
<Style Selector="Label.bold">
|
|
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
|
|
</Style>
|
|
|
|
|
2024-03-24 20:52:42 -04:00
|
|
|
<Style Selector="Button.selectable">
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="Background" Value="Transparent" />
|
2024-05-21 23:07:51 +01:00
|
|
|
<Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" />
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="Button.selectable:pointerover">
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="Button.selectable:pointerover /template/ ContentPresenter">
|
2024-05-21 23:07:51 +01:00
|
|
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="Button.selectable:disabled /template/ ContentPresenter">
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="Background" Value="Transparent" />
|
2024-05-21 23:07:51 +01:00
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Style>
|
2024-05-01 10:31:55 -04:00
|
|
|
|
2024-03-24 20:52:42 -04:00
|
|
|
<Style Selector="Button.selected">
|
2024-05-21 23:07:51 +01:00
|
|
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_LightGrayBlue}" />
|
2024-05-01 10:31:55 -04:00
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Style>
|
2024-05-01 10:31:55 -04:00
|
|
|
</UserControl.Styles>
|
|
|
|
|
2024-03-24 20:52:42 -04:00
|
|
|
<Button CornerRadius="15" Padding="0" Margin="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Center"
|
|
|
|
Command="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
CommandParameter="{Binding }"
|
|
|
|
Classes.selectable="{Binding !IsSelected, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
2024-05-01 10:31:55 -04:00
|
|
|
Classes.selected="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
2024-03-24 20:52:42 -04:00
|
|
|
<Grid ColumnDefinitions="AUTO, AUTO" Margin="3 0 0 3">
|
2024-05-01 10:31:55 -04:00
|
|
|
<cc:StatusSpinner State="{Binding State, RelativeSource={RelativeSource AncestorType=UserControl}}" />
|
|
|
|
|
|
|
|
<Label Grid.Column="1"
|
|
|
|
Content="{Binding PreCheckName, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
Classes.bold="{Binding State, RelativeSource={RelativeSource AncestorType=UserControl},
|
2023-08-25 19:09:36 -04:00
|
|
|
Converter={StaticResource ResourceKey=IsStateConverter},
|
2024-05-01 10:31:55 -04:00
|
|
|
ConverterParameter=Running}" />
|
2024-03-24 20:52:42 -04:00
|
|
|
</Grid>
|
|
|
|
</Button>
|
2024-05-01 10:31:55 -04:00
|
|
|
</UserControl>
|