60 lines
3.1 KiB
Plaintext
Raw Normal View History

<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>
<Style Selector="Button.selectable">
2024-05-01 10:31:55 -04:00
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" />
2024-05-01 10:31:55 -04:00
<Setter Property="FontWeight" Value="SemiBold" />
</Style>
<Style Selector="Button.selectable:pointerover">
2024-05-01 10:31:55 -04:00
<Setter Property="FontWeight" Value="SemiBold" />
</Style>
<Style Selector="Button.selectable:pointerover /template/ ContentPresenter">
<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" />
</Style>
<Style Selector="Button.selectable:disabled /template/ ContentPresenter">
2024-05-01 10:31:55 -04:00
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
</Style>
2024-05-01 10:31:55 -04:00
<Style Selector="Button.selected">
<Setter Property="Background" Value="{StaticResource SPT_Brush_LightGrayBlue}" />
2024-05-01 10:31:55 -04:00
<Setter Property="BorderThickness" Value="1" />
</Style>
2024-05-01 10:31:55 -04:00
</UserControl.Styles>
<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}}">
<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}" />
</Grid>
</Button>
2024-05-01 10:31:55 -04:00
</UserControl>