2024-03-24 20:52:42 -04:00
|
|
|
<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"
|
2024-03-25 18:19:16 -04:00
|
|
|
xmlns:model="using:SPTInstaller.Models"
|
|
|
|
xmlns:cvt="using:SPTInstaller.Converters"
|
2024-03-24 20:52:42 -04:00
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SPTInstaller.CustomControls.PreCheckDetails">
|
2024-05-01 10:31:55 -04:00
|
|
|
|
2024-03-25 18:19:16 -04:00
|
|
|
<UserControl.Resources>
|
2024-05-01 10:31:55 -04:00
|
|
|
<cvt:StateSpinnerStateToColorConverter x:Key="colorConverter" />
|
2024-03-25 18:19:16 -04:00
|
|
|
</UserControl.Resources>
|
2024-05-01 10:31:55 -04:00
|
|
|
|
2024-03-24 20:52:42 -04:00
|
|
|
<Panel>
|
2024-03-25 18:19:16 -04:00
|
|
|
<!-- show when nothing is selected -->
|
|
|
|
<Label Content="Select a Pre-Check to see more info" FontSize="20"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
2024-05-01 10:31:55 -04:00
|
|
|
IsVisible="{Binding HasSelection, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={x:Static BoolConverters.Not}}" />
|
|
|
|
|
2024-03-25 18:19:16 -04:00
|
|
|
<ItemsControl ItemsSource="{Binding PreChecks}" VerticalAlignment="Stretch">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<Grid />
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate DataType="model:PreCheckBase">
|
|
|
|
<!-- selected precheck details -->
|
2024-05-01 10:31:55 -04:00
|
|
|
<Grid RowDefinitions="10, *, Auto, 10" ColumnDefinitions="10, 10, *, 10"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
IsVisible="{Binding IsSelected}">
|
|
|
|
<Rectangle Grid.Row="1" Grid.Column="1" Width="3"
|
|
|
|
Fill="{Binding State, Converter={StaticResource colorConverter}}"
|
|
|
|
HorizontalAlignment="Left" />
|
|
|
|
|
2024-03-25 18:19:16 -04:00
|
|
|
<StackPanel Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left">
|
|
|
|
<Label Content="{Binding Name}"
|
2024-05-01 10:31:55 -04:00
|
|
|
FontSize="20" />
|
|
|
|
<Rectangle Height="1" Fill="Gray" Margin="0 10" />
|
2024-03-25 18:19:16 -04:00
|
|
|
<TextBlock Text="{Binding PreCheckDetails}"
|
2024-05-01 10:31:55 -04:00
|
|
|
TextWrapping="Wrap" />
|
2024-03-25 18:19:16 -04:00
|
|
|
</StackPanel>
|
2024-05-01 10:31:55 -04:00
|
|
|
|
2024-03-25 18:19:16 -04:00
|
|
|
<Button Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Classes="yellow"
|
|
|
|
IsVisible="{Binding ActionButtonIsVisible}"
|
|
|
|
CornerRadius="15"
|
|
|
|
Margin="0 10"
|
|
|
|
Command="{Binding ActionButtonCommand}"
|
|
|
|
Content="{Binding ActionButtonText}"
|
|
|
|
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
2024-05-01 10:31:55 -04:00
|
|
|
HorizontalAlignment="Stretch" />
|
|
|
|
|
2024-03-25 18:19:16 -04:00
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
2024-03-24 20:52:42 -04:00
|
|
|
</Panel>
|
2024-05-01 10:31:55 -04:00
|
|
|
</UserControl>
|