MainWindow.xaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <Window x:Class="CameraImageCaptureTest.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:CameraImageCaptureTest"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="690" Width="800" Closing="OnWindowClosing">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="40"/>
  13. <RowDefinition Height="40"/>
  14. <RowDefinition Height="40"/>
  15. <RowDefinition Height="40"/>
  16. </Grid.RowDefinitions>
  17. <Grid Grid.Row="0">
  18. <local:ImageCanvas x:Name="MyImageCanvas"/>
  19. </Grid>
  20. <Grid Grid.Row="1">
  21. <StackPanel Orientation="Horizontal">
  22. <TextBlock Text="相机类型: " FontSize="12" Margin="2,2,2,2" VerticalAlignment="Center"/>
  23. <ComboBox x:Name="ComboBoxCameraType" FontSize="12" Margin="2,2,2,2" Width="80" VerticalAlignment="Center" SelectionChanged="OnComboBoxCameraTypeSelectionChanged"/>
  24. </StackPanel>
  25. </Grid>
  26. <Grid Grid.Row="2">
  27. <StackPanel Orientation="Horizontal">
  28. <StackPanel Orientation="Horizontal">
  29. <Button Content="选择图片/视频" FontSize="12" Margin="4,4,4,4" Width="120" Click="OnBtnLoadVideoClick"/>
  30. <Button Content="打开(图片/视频)" Margin="4,4,4,4" Width="80" Click="OnBtnOpenCameraClick"/>
  31. <ComboBox x:Name="ComboBoxCameras" Margin="4,4,4,4" Width="120" VerticalAlignment="Center"
  32. SelectionChanged="OnComboBoxCardsSelectionChanged"/>
  33. <Button x:Name="BtnOpenCameras" Content="打开相机" Margin="2,2,2,2" Width="60" Click="OnBtnOpenCameraClick"/>
  34. <Button Content="刷新" Margin="4,4,4,4" Width="60" Click="OnRefreshCardsClick"/>
  35. </StackPanel>
  36. </StackPanel>
  37. </Grid>
  38. <Grid Grid.Row="3">
  39. <StackPanel Orientation="Horizontal">
  40. <TextBlock Text="相机输出耗时:" Margin="4,4,4,4" VerticalAlignment="Center" Width="85"/>
  41. <TextBlock x:Name="TextCameraProcessTime" Margin="4,4,4,4" VerticalAlignment="Center" Width="60"/>
  42. </StackPanel>
  43. </Grid>
  44. </Grid>
  45. </Window>