2023-08-21 18:57: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"
|
|
|
|
xmlns:cc="using:SPTInstaller.CustomControls"
|
|
|
|
xmlns:bh="using:SPTInstaller.Behaviors"
|
|
|
|
xmlns:convt="using:SPTInstaller.Converters"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SPTInstaller.CustomControls.ProgressableTaskList"
|
|
|
|
>
|
|
|
|
<UserControl.Resources>
|
|
|
|
<convt:InvertedProgressConverter x:Key="invtProgressConvt"/>
|
|
|
|
</UserControl.Resources>
|
2023-08-21 18:57:48 -04:00
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<ProgressBar Orientation="Vertical"
|
|
|
|
Value="{Binding TaskProgress, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource ResourceKey=invtProgressConvt}}"
|
|
|
|
Background="{Binding CompletedColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
Foreground="{Binding PendingColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Margin="25 20"
|
2023-05-11 23:11:39 -04:00
|
|
|
/>
|
2023-08-21 18:57:48 -04:00
|
|
|
<ItemsControl Name="itemsControl" ItemsSource="{Binding Tasks, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
Padding="5">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<cc:DistributedSpacePanel/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<cc:ProgressableTaskItem TaskId="{Binding Id}"
|
|
|
|
TaskName="{Binding Name}"
|
|
|
|
IsRunning="{Binding IsRunning}"
|
|
|
|
IsCompleted="{Binding IsCompleted}"
|
|
|
|
PendingColor="{Binding PendingColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
RunningColor="{Binding RunningColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
CompletedColor="{Binding CompletedColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
2023-05-11 23:11:39 -04:00
|
|
|
/>
|
2023-08-21 18:57:48 -04:00
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</Grid>
|
2023-05-11 23:11:39 -04:00
|
|
|
</UserControl>
|