|
13 | 13 | x:Class="Avalonia86.Views.frmMain" |
14 | 14 | Icon="/Assets/86Box-gray.ico" |
15 | 15 | Opened="Main_OnOpened" |
16 | | - Closing="Window_OnClosing"> |
| 16 | + Closing="Window_OnClosing" |
| 17 | + x:Name="MainWindow"> |
17 | 18 | <Design.DataContext> |
18 | 19 | <vm:MainModel/> |
19 | 20 | </Design.DataContext> |
|
102 | 103 |
|
103 | 104 | <conv:BitmapAssetValueConverter x:Key="variableImage"/> |
104 | 105 | <conv:StatusToColorConverter x:Key="colorConv"/> |
| 106 | + <conv:HeightToIsVisibleConverter x:Key="HeightToIsVisible" /> |
105 | 107 | </Window.Resources> |
106 | 108 | <!-- |
107 | 109 | UI Structur |
|
382 | 384 | <ColumnDefinition Width="10"><!-- Where we put the "Grip resizer" dots --></ColumnDefinition> |
383 | 385 | </Grid.ColumnDefinitions> |
384 | 386 | <Grid.RowDefinitions> |
385 | | - <RowDefinition Height="1"><!-- Used to create a thin boarder over the status bar --></RowDefinition> |
| 387 | + <RowDefinition Height="1"><!-- Used to create a thin border over the status bar --></RowDefinition> |
386 | 388 | <RowDefinition Height="18"></RowDefinition> |
387 | 389 | </Grid.RowDefinitions> |
388 | 390 | <Rectangle Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Height="1" Fill="{DynamicResource statusbar_LineBrush}"/> |
|
630 | 632 | </StackPanel> |
631 | 633 | <Rectangle Fill="Transparent" /> |
632 | 634 | </DockPanel> |
633 | | - <Grid DockPanel.Dock="Bottom" ColumnDefinitions="*, *" RowDefinitions="*, *, *, *" Margin="0,0,0,2"> |
634 | | - <TextBlock Grid.Row="0" Grid.Column="0" Text="VM Age"/> |
635 | | - <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Machine.SinceCreated, TargetNullValue='Unknown', Mode=OneWay}" HorizontalAlignment="Right"/> |
636 | | - <TextBlock Grid.Row="1" Grid.Column="0" Text="Uptime"/> |
637 | | - <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Machine.Uptime.Short, Mode=OneWay}" HorizontalAlignment="Right" ToolTip.Placement="Top"> |
638 | | - <ToolTip.Tip> |
639 | | - <StackPanel Orientation="Horizontal"> |
640 | | - <TextBlock>Total uptime: </TextBlock> |
641 | | - <TextBlock Margin="5, 0, 0, 0" Text="{Binding Machine.Uptime.Full, Mode=OneWay}" /> |
642 | | - </StackPanel> |
643 | | - </ToolTip.Tip> |
644 | | - </TextBlock> |
645 | | - <TextBlock Grid.Row="2" Grid.Column="0" Text="Play count"/> |
646 | | - <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Machine.RunCount, Mode=OneWay}" HorizontalAlignment="Right"/> |
647 | | - <TextBlock Grid.Row="3" Grid.Column="0" Text="Disk usage"/> |
648 | | - <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Machine.VMSize, TargetNullValue='Calculating...', Mode=OneWay}" HorizontalAlignment="Right"/> |
649 | | - </Grid> |
| 635 | + <StackPanel DockPanel.Dock="Bottom"> |
| 636 | + <view:ctrlInformation Height="200" DataContext="{Binding Machine, Mode=OneWay}" IsVisible = "{Binding #MainWindow.Height, Converter={StaticResource HeightToIsVisible}, ConverterParameter = 600}" /> |
| 637 | + <Grid ColumnDefinitions="*, *" RowDefinitions="*, *, *, *" Margin="0,0,0,2"> |
| 638 | + <TextBlock Grid.Row="0" Grid.Column="0" Text="VM Age"/> |
| 639 | + <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Machine.SinceCreated, TargetNullValue='Unknown', Mode=OneWay}" HorizontalAlignment="Right"/> |
| 640 | + <TextBlock Grid.Row="1" Grid.Column="0" Text="Uptime"/> |
| 641 | + <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Machine.Uptime.Short, Mode=OneWay}" HorizontalAlignment="Right" ToolTip.Placement="Top"> |
| 642 | + <ToolTip.Tip> |
| 643 | + <StackPanel Orientation="Horizontal"> |
| 644 | + <TextBlock>Total uptime: </TextBlock> |
| 645 | + <TextBlock Margin="5, 0, 0, 0" Text="{Binding Machine.Uptime.Full, Mode=OneWay}" /> |
| 646 | + </StackPanel> |
| 647 | + </ToolTip.Tip> |
| 648 | + </TextBlock> |
| 649 | + <TextBlock Grid.Row="2" Grid.Column="0" Text="Play count"/> |
| 650 | + <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Machine.RunCount, Mode=OneWay}" HorizontalAlignment="Right"/> |
| 651 | + <TextBlock Grid.Row="3" Grid.Column="0" Text="Disk usage"/> |
| 652 | + <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Machine.VMSize, TargetNullValue='Calculating...', Mode=OneWay}" HorizontalAlignment="Right"/> |
| 653 | + </Grid> |
| 654 | + </StackPanel> |
650 | 655 | <Border BorderBrush="#a0a0a0" BorderThickness="1, 1, 0, 0" Margin="0, 0, 0, 8"> |
651 | 656 | <Grid> |
652 | 657 | <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="(None)" /> |
|
657 | 662 | </DockPanel> |
658 | 663 | </TabItem> |
659 | 664 | <TabItem Header="Information" Theme="{StaticResource CustomTabItm}"> |
660 | | - <view:ctrlInformation DataContext="{Binding Machine, Mode=OneWay}"></view:ctrlInformation> |
| 665 | + <view:ctrlInformation DataContext="{Binding Machine, Mode=OneWay}" /> |
661 | 666 | </TabItem> |
662 | 667 | </TabControl> |
663 | 668 | </Grid> |
|
0 commit comments