MainWindow.xaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <Window x:Class="YOLODetectDemo.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:YOLODetectDemo"
  7. mc:Ignorable="d"
  8. Title="YOLO检测" Height="600" Width="1200" Closing="Window_Closing">
  9. <Grid >
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="60"/>
  13. </Grid.RowDefinitions>
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="*"/>
  16. <ColumnDefinition Width="0.4*"/>
  17. </Grid.ColumnDefinitions>
  18. <Grid Grid.Row="0" Grid.Column="0">
  19. <local:ImageCanvas x:Name="MyImageCanvas"/>
  20. </Grid>
  21. <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
  22. <StackPanel Orientation="Horizontal">
  23. <Button Content="Test" FontSize="18" Margin="4,4,4,4" Width="80" Click="OnBtnTestClicked"/>
  24. <CheckBox x:Name="CheckBoxEnableAI" IsChecked="True" FontSize="18" Content="启用AI" Margin="4,4,4,4"
  25. VerticalAlignment="Center" Unchecked="OnUncheckedEnableAI" Checked="OnCheckedEnableAI"/>
  26. <CheckBox x:Name="CheckboxIsCropped" IsChecked="True" Content="已裁切" VerticalContentAlignment="Center" VerticalAlignment="Center"
  27. FontSize="18" Margin="4,4,4,4" Checked="OnCheckedIsCropped" Unchecked="OnUncheckedIsCropped"/>
  28. <TextBlock Text="推理时间(毫秒):" FontSize="18" Margin="4,4,4,4" VerticalAlignment="Center"/>
  29. <TextBlock x:Name="ForwardTime" FontSize="18" Margin="4,4,4,4" VerticalAlignment="Center" Width="60"/>
  30. <TextBlock Text="CPU数量:" FontSize="18" Margin="4,4,4,4" VerticalAlignment="Center"/>
  31. <TextBox x:Name="TextBoxCPU" Text ="1" FontSize="18" Margin="4,4,4,4" VerticalAlignment="Center" Width="51"/>
  32. </StackPanel>
  33. </Grid>
  34. </Grid>
  35. </Window>