<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"
             xmlns:cc="using:SPTInstaller.CustomControls"
             xmlns:convt="using:SPTInstaller.Converters"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="SPTInstaller.CustomControls.PreCheckItem">

    <UserControl.Resources>
        <convt:StatusSpinnerIsStateConverter x:Key="IsStateConverter"/>
    </UserControl.Resources>
	<UserControl.Styles>
		<Style Selector="Label.bold">
			<Setter Property="FontWeight" Value="Bold"/>
		</Style>
	</UserControl.Styles>
	
	
	<Grid ColumnDefinitions="AUTO, AUTO" Margin="3">
        <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}
                             Converter={StaticResource ResourceKey=IsStateConverter},
                             ConverterParameter=Running}"
			   />
	</Grid>
</UserControl>