mirror of
https://github.com/unclshura/splitter.git
synced 2026-06-21 16:12:01 +00:00
51 lines
2.0 KiB
XML
51 lines
2.0 KiB
XML
<UserControl
|
|
x:Class="Splitter_UI.Views.ProgressView"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:Splitter_UI.ViewModels"
|
|
x:DataType="vm:ProgressViewModel">
|
|
|
|
<Border Background="#111" Padding="8">
|
|
<ItemsControl ItemsSource="{Binding Processes}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:ProgressInfo">
|
|
<Grid ColumnDefinitions="2*,3*,Auto,Auto"
|
|
Margin="0,2">
|
|
|
|
<!-- Name -->
|
|
<TextBlock Grid.Column="0"
|
|
Text="{Binding Name}"
|
|
VerticalAlignment="Center"
|
|
FontSize="12"/>
|
|
|
|
<!-- Progress bar -->
|
|
<ProgressBar Grid.Column="1"
|
|
Height="12"
|
|
Minimum="0"
|
|
Maximum="1"
|
|
Value="{Binding Progress}"
|
|
Margin="8,0"/>
|
|
|
|
<!-- ETA -->
|
|
<TextBlock Grid.Column="2"
|
|
Width="70"
|
|
Text="{Binding Eta, StringFormat={}{0:hh\\:mm\\:ss}}"
|
|
VerticalAlignment="Center"
|
|
Margin="12,0"
|
|
FontSize="12"/>
|
|
|
|
<!-- Speed -->
|
|
<TextBlock Grid.Column="3"
|
|
Width="70"
|
|
Text="{Binding Speed, StringFormat={}{0:0.00}}"
|
|
VerticalAlignment="Center"
|
|
Margin="12,0"
|
|
FontSize="12"/>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Border>
|
|
</UserControl>
|