MainWindow.xaml 2.5 KB

12345678910111213141516171819202122232425262728293031
  1. <Window x:Class="YoloV5ImageLableWpfApp.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:YoloV5ImageLableWpfApp"
  7. mc:Ignorable="d"
  8. Title="MainWindow" MinHeight="1080" MinWidth="1920">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="2*"></ColumnDefinition>
  12. <ColumnDefinition Width="8*"></ColumnDefinition>
  13. </Grid.ColumnDefinitions>
  14. <Canvas Grid.Column="0">
  15. <Label Height="48" Width="374" FontSize="27" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">图片标记区</Label>
  16. <Button Canvas.Left="44" Canvas.Top="53" Height="36" Width="100" Click="Button_Click">选择图片目录</Button>
  17. <Button Canvas.Left="166" Canvas.Top="53" HorizontalAlignment="Center" VerticalAlignment="Top" Height="36" Width="84">移除目录</Button>
  18. <Button Canvas.Left="262" Canvas.Top="53" HorizontalAlignment="Center" VerticalAlignment="Top" Height="81" Width="80" Click="Button_Click_1">完成标记</Button>
  19. <TextBox Width="148" Text="1" FontSize="20" x:Name="lableName" Height="28" Canvas.Left="92" Canvas.Top="106" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
  20. <Label Canvas.Left="29" Canvas.Top="106" HorizontalAlignment="Left" VerticalAlignment="Top">标记名称</Label>
  21. <ListBox DisplayMemberPath="Name" MouseLeftButtonDown="imageList_MouseDoubleClick" MouseDoubleClick="imageList_MouseDoubleClick" x:Name="imageList" Height="851" Width="364" Canvas.Left="10" Canvas.Top="204" HorizontalAlignment="Center" VerticalAlignment="Top" d:ItemsSource="{d:SampleData ItemCount=5}"></ListBox>
  22. <TextBlock TextWrapping="WrapWithOverflow" Width="293" x:Name="filePath" Height="48" Canvas.Left="92" Canvas.Top="152" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  23. <Label Canvas.Left="29" Canvas.Top="152" Content="图片路径" HorizontalAlignment="Center" VerticalAlignment="Top"/>
  24. </Canvas>
  25. <Canvas Grid.Column="1" x:Name="canvas" Width="960" Height="540">
  26. <Image Canvas.Left="0" Canvas.Top="0" x:Name="image" Height="540" Width="960"></Image>
  27. </Canvas>
  28. </Grid>
  29. </Window>