MenuView.xaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <UserControl x:Class="LampInspectionMachine.Views.MenuView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:LampInspectionMachine.Views"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800">
  12. <UserControl.Resources>
  13. <Style x:Key="buttonborder"
  14. TargetType="Border">
  15. <Setter Property="BorderThickness"
  16. Value="2" />
  17. <Setter Property="Background"
  18. Value="Transparent" />
  19. <Setter Property="VerticalAlignment"
  20. Value="Center" />
  21. <Setter Property="BorderBrush"
  22. Value="White" />
  23. <Setter Property="CornerRadius"
  24. Value="5" />
  25. <Setter Property="Effect">
  26. <Setter.Value>
  27. <DropShadowEffect BlurRadius="10"
  28. Direction="0"
  29. ShadowDepth="0"
  30. Color="#D4D8DD" />
  31. </Setter.Value>
  32. </Setter>
  33. </Style>
  34. <Style x:Key="textborder"
  35. TargetType="Border">
  36. <Setter Property="BorderThickness"
  37. Value="2" />
  38. <Setter Property="Background"
  39. Value="Transparent" />
  40. <Setter Property="VerticalAlignment"
  41. Value="Center" />
  42. <Setter Property="BorderBrush"
  43. Value="#D4D8DD" />
  44. <Setter Property="CornerRadius"
  45. Value="5" />
  46. <Setter Property="Effect">
  47. <Setter.Value>
  48. <DropShadowEffect BlurRadius="10"
  49. Direction="0"
  50. ShadowDepth="0"
  51. Color="White" />
  52. </Setter.Value>
  53. </Setter>
  54. </Style>
  55. <Style x:Key="Menubutton"
  56. TargetType="Button">
  57. <Setter Property="Background"
  58. Value="Transparent" />
  59. <Setter Property="HorizontalContentAlignment"
  60. Value="Left" />
  61. <Setter Property="FontWeight"
  62. Value="Bold" />
  63. <Setter Property="Margin"
  64. Value="15,5,5,5" />
  65. <Setter Property="Padding"
  66. Value="5" />
  67. <Setter Property="FontSize"
  68. Value="14" />
  69. <Setter Property="BorderThickness"
  70. Value="0" />
  71. </Style>
  72. </UserControl.Resources>
  73. <Grid>
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition Width="Auto" />
  76. <ColumnDefinition Width="*" />
  77. </Grid.ColumnDefinitions>
  78. <Border Grid.Column="0"
  79. Margin="10"
  80. Padding="2"
  81. CornerRadius="5"
  82. BorderBrush="#D4D8DD"
  83. BorderThickness="2">
  84. <Grid Margin="5">
  85. <Grid>
  86. <Grid.RowDefinitions>
  87. <RowDefinition Height="40" />
  88. <RowDefinition />
  89. </Grid.RowDefinitions>
  90. <Border Style="{StaticResource textborder}"
  91. Grid.Row="0">
  92. <TextBlock Text="调试"
  93. Width="150"
  94. Margin="15,5,5,5"
  95. FontSize="14" />
  96. </Border>
  97. <Border BorderBrush="#D4D8DD"
  98. BorderThickness="1"
  99. Grid.Row="1">
  100. <StackPanel>
  101. <Button Content="相机1"
  102. Style="{StaticResource Menubutton}"
  103. Command="{Binding OpenCameraViewCommand}"
  104. CommandParameter="0"/>
  105. <Button Content="视觉调试"
  106. Margin="30,0,5,5"
  107. Style="{StaticResource Menubutton}"
  108. Command="{Binding OpenVisionProViewCommand}"
  109. CommandParameter="0"/>
  110. <Button Content="相机2"
  111. Style="{StaticResource Menubutton}"
  112. Command="{Binding OpenCameraViewCommand}"
  113. CommandParameter="1"/>
  114. <Button Content="视觉调试"
  115. Margin="30,0,5,5"
  116. Style="{StaticResource Menubutton}"
  117. Command="{Binding OpenVisionProViewCommand}"
  118. CommandParameter="1"/>
  119. <Button Content="相机3"
  120. Style="{StaticResource Menubutton}"
  121. Command="{Binding OpenCameraViewCommand}"
  122. CommandParameter="2" />
  123. <Button Content="视觉调试"
  124. Margin="30,0,5,5"
  125. Style="{StaticResource Menubutton}"
  126. Command="{Binding OpenVisionProViewCommand}"
  127. CommandParameter="2" />
  128. <Button Content="相机4"
  129. Style="{StaticResource Menubutton}"
  130. Command="{Binding OpenCameraViewCommand}"
  131. CommandParameter="3" />
  132. <Button Content="视觉调试"
  133. Margin="30,0,5,5"
  134. Style="{StaticResource Menubutton}"
  135. Command="{Binding OpenVisionProViewCommand}"
  136. CommandParameter="3" />
  137. <Button Content="相机5"
  138. Style="{StaticResource Menubutton}"
  139. Command="{Binding OpenCameraViewCommand}"
  140. CommandParameter="4" />
  141. <Button Content="视觉调试"
  142. Margin="30,0,5,5"
  143. Style="{StaticResource Menubutton}"
  144. Command="{Binding OpenVisionProViewCommand}"
  145. CommandParameter="4" />
  146. <Button Content="相机6"
  147. Style="{StaticResource Menubutton}"
  148. Command="{Binding OpenCameraViewCommand}"
  149. CommandParameter="5" />
  150. <Button Content="视觉调试"
  151. Margin="30,0,5,5"
  152. Style="{StaticResource Menubutton}"
  153. Command="{Binding OpenVisionProViewCommand}"
  154. CommandParameter="5" />
  155. <Button Content="相机7"
  156. Style="{StaticResource Menubutton}"
  157. Command="{Binding OpenCameraViewCommand}"
  158. CommandParameter="6" />
  159. <Button Content="视觉调试"
  160. Margin="30,0,5,5"
  161. Style="{StaticResource Menubutton}"
  162. Command="{Binding OpenVisionProViewCommand}"
  163. CommandParameter="6" />
  164. <Button Content="相机8"
  165. Style="{StaticResource Menubutton}"
  166. Command="{Binding OpenCameraViewCommand}"
  167. CommandParameter="7" />
  168. <Button Content="视觉调试"
  169. Margin="30,0,5,5"
  170. Style="{StaticResource Menubutton}"
  171. Command="{Binding OpenVisionProViewCommand}"
  172. CommandParameter="7" />
  173. </StackPanel>
  174. </Border>
  175. </Grid>
  176. </Grid>
  177. </Border>
  178. <Border Grid.Column="1"
  179. Margin="20"
  180. BorderBrush="#D4D8DD"
  181. BorderThickness="2">
  182. <ContentControl prism:RegionManager.RegionName="MenuRegionContent" />
  183. </Border>
  184. </Grid>
  185. </UserControl>