MenuView.xaml 9.1 KB

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