DriveServoView.xaml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <UserControl x:Class="OHV.Module.Interactivity.PopUp.DriveServoView"
  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:OHV.Module.Interactivity.PopUp"
  7. xmlns:prism="http://prismlibrary.com/"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. mc:Ignorable="d"
  11. Width="1130"
  12. Height="700"
  13. Background="#455a64">
  14. <prism:Dialog.WindowStyle>
  15. <Style TargetType="Window">
  16. <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
  17. <Setter Property="Background" Value="Transparent"/>
  18. <Setter Property="AllowsTransparency" Value="True"/>
  19. <Setter Property="ResizeMode" Value="NoResize"/>
  20. <Setter Property="WindowStyle" Value="None"/>
  21. <Setter Property="BorderThickness" Value="1"/>
  22. <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
  23. <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
  24. <!--<Style.Triggers>
  25. <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
  26. <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
  27. </Trigger>
  28. </Style.Triggers>-->
  29. </Style>
  30. </prism:Dialog.WindowStyle>
  31. <UserControl.Resources>
  32. <Style x:Key="MaterialDesignDataGridRowHeader" TargetType="{x:Type DataGridRowHeader}">
  33. <Setter Property="Template">
  34. <Setter.Value>
  35. <ControlTemplate TargetType="{x:Type DataGridRowHeader}">
  36. <Grid MinWidth="24">
  37. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
  38. <StackPanel Orientation="Horizontal">
  39. <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  40. <Control SnapsToDevicePixels="false" Template="{Binding ValidationErrorTemplate, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}" Visibility="{Binding (Validation.HasError), Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"/>
  41. </StackPanel>
  42. </Border>
  43. <Thumb x:Name="PART_TopHeaderGripper" Style="{StaticResource MaterialDesignGridRowHeaderGripper}" VerticalAlignment="Top"/>
  44. <Thumb x:Name="PART_BottomHeaderGripper" Style="{StaticResource MaterialDesignGridRowHeaderGripper}" VerticalAlignment="Bottom"/>
  45. </Grid>
  46. </ControlTemplate>
  47. </Setter.Value>
  48. </Setter>
  49. </Style>
  50. </UserControl.Resources>
  51. <Grid>
  52. <Grid.ColumnDefinitions>
  53. <ColumnDefinition/>
  54. <ColumnDefinition Width="130"/>
  55. <ColumnDefinition Width="130"/>
  56. </Grid.ColumnDefinitions>
  57. <Grid Grid.Column="0" Margin="15"
  58. Background="#37474f">
  59. <Grid.RowDefinitions>
  60. <RowDefinition Height="*"/>
  61. <RowDefinition Height="*"/>
  62. </Grid.RowDefinitions>
  63. <!--Position Data Grid View-->
  64. <Grid Grid.Row="0">
  65. <DataGrid
  66. Margin="15"
  67. ItemsSource="{Binding POS}"
  68. CanUserSortColumns="True"
  69. CanUserAddRows="False"
  70. Background="{x:Null}"
  71. Width="auto"
  72. Height="auto"
  73. BorderBrush="#FF00FFD3"
  74. BorderThickness="1"
  75. SelectedItem="{Binding SelectedRow1}">
  76. <DataGrid.ColumnHeaderStyle>
  77. <Style TargetType="DataGridColumnHeader">
  78. <Setter Property="BorderBrush" Value="#FF00FFD3"/>
  79. <Setter Property="Foreground" Value="White"/>
  80. <Setter Property="FontSize" Value="20"/>
  81. <Setter Property="HorizontalAlignment" Value="Center"/>
  82. <Setter Property="VerticalAlignment" Value="Center"/>
  83. </Style>
  84. </DataGrid.ColumnHeaderStyle>
  85. <DataGrid.CellStyle>
  86. <Style TargetType="DataGridCell">
  87. <Setter Property="TextBlock.TextAlignment" Value="Center"/>
  88. <Setter Property="TextBlock.FontStretch" Value="UltraExpanded"/>
  89. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  90. <Setter Property="BorderBrush" Value="#FF00FFD3"/>
  91. <Setter Property="Foreground" Value="White"/>
  92. <Setter Property="FontSize" Value="15"/>
  93. <Setter Property="Width" Value="161"/>
  94. <Setter Property="Height" Value="50"/>
  95. </Style>
  96. </DataGrid.CellStyle>
  97. </DataGrid>
  98. </Grid>
  99. <!--Axis Grid View-->
  100. <Grid Grid.Row="1">
  101. <Grid.RowDefinitions>
  102. <RowDefinition Height="*"/>
  103. <RowDefinition Height="*"/>
  104. <RowDefinition Height="*"/>
  105. <RowDefinition Height="*"/>
  106. </Grid.RowDefinitions>
  107. <Grid.ColumnDefinitions>
  108. <ColumnDefinition Width="*"/>
  109. <ColumnDefinition Width="*"/>
  110. <ColumnDefinition Width="*"/>
  111. <ColumnDefinition Width="*"/>
  112. <ColumnDefinition Width="*"/>
  113. </Grid.ColumnDefinitions>
  114. <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  115. Style="{StaticResource MaterialDesignRaisedButton}"
  116. materialDesign:ButtonAssist.CornerRadius="10"
  117. ToolTip="MaterialDesignRaisedButton with Round Corners">
  118. <StackPanel>
  119. <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
  120. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  121. </StackPanel>
  122. </Button>
  123. <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  124. Style="{StaticResource MaterialDesignRaisedButton}"
  125. materialDesign:ButtonAssist.CornerRadius="10"
  126. ToolTip="MaterialDesignRaisedButton with Round Corners">
  127. <StackPanel>
  128. <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
  129. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  130. </StackPanel>
  131. </Button>
  132. <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  133. Style="{StaticResource MaterialDesignRaisedButton}"
  134. materialDesign:ButtonAssist.CornerRadius="10"
  135. ToolTip="MaterialDesignRaisedButton with Round Corners">
  136. <StackPanel>
  137. <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
  138. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  139. </StackPanel>
  140. </Button>
  141. <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  142. Style="{StaticResource MaterialDesignRaisedButton}"
  143. materialDesign:ButtonAssist.CornerRadius="10"
  144. ToolTip="MaterialDesignRaisedButton with Round Corners"
  145. Command="{Binding SelectAxisCommand}"
  146. CommandParameter="Left">
  147. <TextBlock><Run Text="Drive1"/></TextBlock>
  148. </Button>
  149. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  150. Style="{StaticResource MaterialDesignRaisedButton}"
  151. materialDesign:ButtonAssist.CornerRadius="10"
  152. ToolTip="MaterialDesignRaisedButton with Round Corners">
  153. <Button.InputBindings>
  154. <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
  155. </Button.InputBindings>
  156. <TextBlock><Run Text="{Binding TargetPosDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  157. </Button>
  158. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  159. Style="{StaticResource MaterialDesignRaisedButton}"
  160. materialDesign:ButtonAssist.CornerRadius="10"
  161. ToolTip="MaterialDesignRaisedButton with Round Corners">
  162. <TextBlock><Run Text="{Binding CurrentDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  163. </Button>
  164. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  165. Style="{StaticResource MaterialDesignRaisedButton}"
  166. materialDesign:ButtonAssist.CornerRadius="10"
  167. ToolTip="MaterialDesignRaisedButton with Round Corners">
  168. <TextBlock><Run Text="{Binding DifferenceDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  169. </Button>
  170. </Grid>
  171. </Grid>
  172. <Grid Grid.Column="1" Background="#263238">
  173. <StackPanel>
  174. <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2"
  175. Command="{Binding PositionAddCommand}">
  176. <StackPanel>
  177. <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  178. <TextBlock Text="Add" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  179. </StackPanel>
  180. </Button>
  181. <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2"
  182. Command="{Binding PositionDeleteCommand}">
  183. <StackPanel>
  184. <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  185. <TextBlock Text="Delete" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  186. </StackPanel>
  187. </Button>
  188. <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2"
  189. Command="{Binding PositionSaveCommand}">
  190. <StackPanel>
  191. <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  192. <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  193. </StackPanel>
  194. </Button>
  195. <!--Move TO / Current To Target-->
  196. <Button Margin="7, 50" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2"
  197. Command="{Binding MoveToCommand}">
  198. <StackPanel>
  199. <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  200. <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  201. </StackPanel>
  202. </Button>
  203. <Button Margin="7,0" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2"
  204. Command="{Binding CurrentToTargetCommand}">
  205. <StackPanel>
  206. <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  207. <TextBlock Text="Current To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  208. <TextBlock Text="Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  209. </StackPanel>
  210. </Button>
  211. </StackPanel>
  212. </Grid>
  213. <Grid Grid.Column="2" Background="#263238">
  214. <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
  215. <StackPanel>
  216. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
  217. <StackPanel>
  218. <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  219. <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  220. </StackPanel>
  221. </Button>
  222. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
  223. <StackPanel>
  224. <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  225. <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  226. </StackPanel>
  227. </Button>
  228. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
  229. <StackPanel>
  230. <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  231. <TextBlock Text="Fault Reset" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  232. </StackPanel>
  233. </Button>
  234. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
  235. <StackPanel>
  236. <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  237. <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  238. </StackPanel>
  239. </Button>
  240. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
  241. <StackPanel>
  242. <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  243. <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  244. </StackPanel>
  245. </Button>
  246. </StackPanel>
  247. </Grid>
  248. </Grid>
  249. <!--<Grid>
  250. <Grid.ColumnDefinitions>
  251. <ColumnDefinition/>
  252. <ColumnDefinition Width="130"/>
  253. <ColumnDefinition Width="130"/>
  254. </Grid.ColumnDefinitions>
  255. <Grid Grid.Column="0">
  256. <Grid Margin="15,15" Background="#37474f">
  257. <Grid.RowDefinitions>
  258. <RowDefinition/>
  259. <RowDefinition/>
  260. </Grid.RowDefinitions>
  261. <Grid.ColumnDefinitions>
  262. <ColumnDefinition/>
  263. <ColumnDefinition Width="110"/>
  264. </Grid.ColumnDefinitions>
  265. <Grid Grid.Row="0">
  266. <Grid.RowDefinitions>
  267. <RowDefinition Height="*"/>
  268. <RowDefinition Height="*"/>
  269. <RowDefinition Height="*"/>
  270. <RowDefinition Height="*"/>
  271. </Grid.RowDefinitions>
  272. <Grid.ColumnDefinitions>
  273. <ColumnDefinition Width="*"/>
  274. <ColumnDefinition Width="*"/>
  275. <ColumnDefinition Width="*"/>
  276. <ColumnDefinition Width="*"/>
  277. </Grid.ColumnDefinitions>
  278. <Border BorderBrush="#FF00FFD3" BorderThickness="2" Grid.RowSpan="4" Grid.Column="3" Margin="95,3,0,0"/>
  279. <Button Background="{x:Null}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  280. Style="{StaticResource MaterialDesignRaisedButton}"
  281. materialDesign:ButtonAssist.CornerRadius="10"
  282. ToolTip="MaterialDesignRaisedButton with Round Corners">
  283. <StackPanel>
  284. <TextBlock HorizontalAlignment="Center"><Run Text="Axis"/></TextBlock>
  285. <TextBlock HorizontalAlignment="Center"><Run Text="Select"/></TextBlock>
  286. </StackPanel>
  287. </Button>
  288. <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  289. Style="{StaticResource MaterialDesignRaisedButton}"
  290. materialDesign:ButtonAssist.CornerRadius="10"
  291. ToolTip="MaterialDesignRaisedButton with Round Corners">
  292. <StackPanel>
  293. <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
  294. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  295. </StackPanel>
  296. </Button>
  297. <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  298. Style="{StaticResource MaterialDesignRaisedButton}"
  299. materialDesign:ButtonAssist.CornerRadius="10"
  300. ToolTip="MaterialDesignRaisedButton with Round Corners">
  301. <StackPanel>
  302. <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
  303. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  304. </StackPanel>
  305. </Button>
  306. <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  307. Style="{StaticResource MaterialDesignRaisedButton}"
  308. materialDesign:ButtonAssist.CornerRadius="10"
  309. ToolTip="MaterialDesignRaisedButton with Round Corners">
  310. <StackPanel>
  311. <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
  312. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  313. </StackPanel>
  314. </Button>
  315. <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  316. Style="{StaticResource MaterialDesignRaisedButton}"
  317. materialDesign:ButtonAssist.CornerRadius="10"
  318. ToolTip="MaterialDesignRaisedButton with Round Corners"
  319. Command="{Binding SelectAxisCommand}"
  320. CommandParameter="Left">
  321. <TextBlock><Run Text="#Drive1"/></TextBlock>
  322. </Button>
  323. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  324. Style="{StaticResource MaterialDesignRaisedButton}"
  325. materialDesign:ButtonAssist.CornerRadius="10"
  326. ToolTip="MaterialDesignRaisedButton with Round Corners">
  327. <Button.InputBindings>
  328. <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
  329. </Button.InputBindings>
  330. <TextBlock><Run Text="{Binding TargetPosDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  331. </Button>
  332. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  333. Style="{StaticResource MaterialDesignRaisedButton}"
  334. materialDesign:ButtonAssist.CornerRadius="10"
  335. ToolTip="MaterialDesignRaisedButton with Round Corners">
  336. <TextBlock><Run Text="{Binding CurrentDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  337. </Button>
  338. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  339. Style="{StaticResource MaterialDesignRaisedButton}"
  340. materialDesign:ButtonAssist.CornerRadius="10"
  341. ToolTip="MaterialDesignRaisedButton with Round Corners">
  342. <TextBlock><Run Text="{Binding DifferenceDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  343. </Button>
  344. <Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  345. Style="{StaticResource MaterialDesignRaisedButton}"
  346. materialDesign:ButtonAssist.CornerRadius="10"
  347. ToolTip="MaterialDesignRaisedButton with Round Corners"
  348. Command="{Binding SelectAxisCommand}"
  349. CommandParameter="Right">
  350. <TextBlock><Run Text="#Drive2"/></TextBlock>
  351. </Button>
  352. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  353. Style="{StaticResource MaterialDesignRaisedButton}"
  354. materialDesign:ButtonAssist.CornerRadius="10"
  355. ToolTip="MaterialDesignRaisedButton with Round Corners">
  356. <Button.InputBindings>
  357. <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
  358. </Button.InputBindings>
  359. <TextBlock><Run Text="{Binding TargetPosDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  360. </Button>
  361. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  362. Style="{StaticResource MaterialDesignRaisedButton}"
  363. materialDesign:ButtonAssist.CornerRadius="10"
  364. ToolTip="MaterialDesignRaisedButton with Round Corners">
  365. <TextBlock><Run Text="{Binding CurrentDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  366. </Button>
  367. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  368. Style="{StaticResource MaterialDesignRaisedButton}"
  369. materialDesign:ButtonAssist.CornerRadius="10"
  370. ToolTip="MaterialDesignRaisedButton with Round Corners">
  371. <TextBlock><Run Text="{Binding DifferenceDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  372. </Button>
  373. <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,98,101,-33" Grid.ColumnSpan="4" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
  374. <Border.RenderTransform>
  375. <TransformGroup>
  376. <ScaleTransform ScaleX="-1"/>
  377. <SkewTransform/>
  378. <RotateTransform/>
  379. <TranslateTransform/>
  380. </TransformGroup>
  381. </Border.RenderTransform>
  382. </Border>
  383. </Grid>
  384. <Grid Grid.Row="1">
  385. <StackPanel Margin="50,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
  386. <Button
  387. Style="{StaticResource MaterialDesignRaisedButton}"
  388. materialDesign:ButtonAssist.CornerRadius="10"
  389. ToolTip="MaterialDesignRaisedButton with Round Corners"
  390. Margin="15"
  391. Height="auto"
  392. HorizontalAlignment="Center"
  393. VerticalAlignment="Center"
  394. >
  395. <StackPanel>
  396. <TextBlock><Run Text="Limit(-)"/></TextBlock>
  397. </StackPanel>
  398. </Button>
  399. <Button
  400. Style="{StaticResource MaterialDesignRaisedButton}"
  401. materialDesign:ButtonAssist.CornerRadius="10"
  402. ToolTip="MaterialDesignRaisedButton with Round Corners"
  403. Margin="15"
  404. Height="auto"
  405. HorizontalAlignment="Center"
  406. VerticalAlignment="Center">
  407. <StackPanel>
  408. <TextBlock><Run Text="Limit(+)"/></TextBlock>
  409. </StackPanel>
  410. </Button>
  411. </StackPanel>
  412. <StackPanel Margin="30,0,0,50" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
  413. <Button
  414. Margin="5"
  415. Grid.Row="2"
  416. Grid.Column="1"
  417. HorizontalAlignment="Stretch"
  418. Height="auto">
  419. <StackPanel>
  420. <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
  421. <TextBlock><Run Text="Jog(-)"/></TextBlock>
  422. </StackPanel>
  423. </Button>
  424. <materialDesign:Badged
  425. Grid.Row="2"
  426. Grid.Column="2"
  427. Badge="Jog Velocity"
  428. BadgeColorZoneMode="Dark"
  429. BadgePlacementMode="Top"
  430. BadgeForeground="Aqua"
  431. VerticalAlignment="Center"
  432. HorizontalAlignment="Center">
  433. <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="60" Width="Auto" >
  434. <StackPanel>
  435. <TextBlock Text="0.000"/>
  436. </StackPanel>
  437. </Button>
  438. </materialDesign:Badged>
  439. <Button
  440. Margin="5"
  441. Grid.Row="2"
  442. Grid.Column="3"
  443. HorizontalAlignment="Stretch"
  444. Height="auto">
  445. <StackPanel>
  446. <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
  447. <TextBlock><Run Text="Jog(+)"/></TextBlock>
  448. </StackPanel>
  449. </Button>
  450. </StackPanel>
  451. </Grid>
  452. <Grid Grid.Column="1">
  453. <StackPanel>
  454. <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="1" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  455. Command="{Binding SelectPosCommand}" CommandParameter="P1">
  456. <StackPanel>
  457. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  458. <TextBlock Text="P1" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  459. </StackPanel>
  460. </Button>
  461. <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="2" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  462. Command="{Binding SelectPosCommand}" CommandParameter="P2">
  463. <StackPanel>
  464. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  465. <TextBlock Text="P2" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  466. </StackPanel>
  467. </Button>
  468. <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  469. Command="{Binding SelectPosCommand}" CommandParameter="P3">
  470. <StackPanel>
  471. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  472. <TextBlock Text="P3" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  473. </StackPanel>
  474. </Button>
  475. <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  476. Command="{Binding SelectPosCommand}" CommandParameter="P4">
  477. <StackPanel>
  478. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  479. <TextBlock Text="P4" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  480. </StackPanel>
  481. </Button>
  482. <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  483. Command="{Binding SelectPosCommand}" CommandParameter="P5">
  484. <StackPanel>
  485. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  486. <TextBlock Text="P5" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  487. </StackPanel>
  488. </Button>
  489. </StackPanel>
  490. </Grid>
  491. </Grid>
  492. </Grid>
  493. <Grid Grid.Column="1" Background="#37474f">
  494. <StackPanel>
  495. <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
  496. Style="{DynamicResource MaterialDesignRaisedButton}"
  497. materialDesign:ShadowAssist.ShadowDepth="Depth5"
  498. Command="{Binding MoveToCommand}">
  499. <StackPanel>
  500. <materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  501. <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  502. </StackPanel>
  503. </Button>
  504. <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
  505. Style="{DynamicResource MaterialDesignRaisedButton}"
  506. materialDesign:ShadowAssist.ShadowDepth="Depth5"
  507. Command="{Binding CurrentToTargetCommand}">
  508. <StackPanel>
  509. <materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  510. <TextBlock Text="Current" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  511. <TextBlock Text="To Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  512. </StackPanel>
  513. </Button>
  514. </StackPanel>
  515. </Grid>
  516. <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
  517. <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
  518. <StackPanel>
  519. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
  520. <StackPanel>
  521. <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  522. <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  523. </StackPanel>
  524. </Button>
  525. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
  526. <StackPanel>
  527. <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  528. <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  529. </StackPanel>
  530. </Button>
  531. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
  532. <StackPanel>
  533. <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  534. <TextBlock Text="Fault Reset" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  535. </StackPanel>
  536. </Button>
  537. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
  538. <StackPanel>
  539. <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  540. <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  541. </StackPanel>
  542. </Button>
  543. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
  544. <StackPanel>
  545. <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  546. <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  547. </StackPanel>
  548. </Button>
  549. </StackPanel>
  550. </Grid>
  551. </Grid>-->
  552. </UserControl>