Switched to Avalonia
This commit is contained in:
52
ParentAvalonia/MainWindow.axaml
Normal file
52
ParentAvalonia/MainWindow.axaml
Normal file
@@ -0,0 +1,52 @@
|
||||
<Window 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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="ParentAvalonia.MainWindow"
|
||||
Title="CommTester (Parent - Avalonia)" Width="1000" Height="650">
|
||||
<Grid Margin="12" RowDefinitions="Auto,12,*" ColumnDefinitions="260,12,*">
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" Spacing="8">
|
||||
<Button Content="Start 3 Children" Padding="12,6" Click="StartChildren_Click" />
|
||||
<Button Content="Ping Selected" Padding="12,6" Click="PingSelected_Click" />
|
||||
<Button Content="Start Work" Padding="12,6" Click="StartWork_Click" />
|
||||
<Button Content="Cancel Work" Padding="12,6" Click="CancelWork_Click" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="2" Grid.Column="0" BorderBrush="#444" BorderThickness="1" CornerRadius="6">
|
||||
<DockPanel Margin="10">
|
||||
<TextBlock DockPanel.Dock="Top" FontSize="14" FontWeight="SemiBold" Text="Children" />
|
||||
<TextBlock DockPanel.Dock="Top" Margin="0,6,0,0" Foreground="Gray" FontSize="11"
|
||||
Text="Select a child to inspect its stream." />
|
||||
<ListBox Margin="0,8,0,0"
|
||||
ItemsSource="{Binding Children}"
|
||||
SelectedItem="{Binding SelectedChild}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="2" Grid.Column="2" RowDefinitions="Auto,Auto,12,*,Auto">
|
||||
<TextBlock Grid.Row="0" FontSize="14" FontWeight="SemiBold"
|
||||
Text="{Binding SelectedChild.StatusLine, FallbackValue=No child selected}" />
|
||||
|
||||
<ProgressBar Grid.Row="1" Height="18" Minimum="0" Maximum="100"
|
||||
Value="{Binding SelectedChild.ProgressPercent, FallbackValue=0}" />
|
||||
|
||||
<Border Grid.Row="3" BorderBrush="#444" BorderThickness="1" CornerRadius="6">
|
||||
<DockPanel Margin="10">
|
||||
<TextBlock DockPanel.Dock="Top" FontSize="14" FontWeight="SemiBold" Text="Stream (Log/Progress/Result)" />
|
||||
<ListBox Margin="0,8,0,0" ItemsSource="{Binding SelectedChild.Logs}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="4" Foreground="Gray" FontSize="11"
|
||||
Text="{Binding SelectedChild.PipePath, FallbackValue=-}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user