终端一体化运控平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

653 linhas
34 KiB

  1. <Window
  2. x:Class="BPASmartClient.CustomResource.Pages.View.MainView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.CustomResource.Pages.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
  9. Title="MainView"
  10. Width="1200"
  11. Height="700"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="False"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.DataContext>
  19. <vm:MainViewModel />
  20. </Window.DataContext>
  21. <Window.Resources>
  22. <!--#region 静态资源-->
  23. <ImageBrush x:Key="leftImage" ImageSource="../../Image/leftImage.png" />
  24. <ImageBrush x:Key="leftImageSub" ImageSource="../../Image/leftImageSub.png" />
  25. <ImageBrush x:Key="topImage" ImageSource="../../Image/topImage.png" />
  26. <!--#endregion-->
  27. <!--#region 标题栏按钮样式-->
  28. <Style x:Key="TitleBarStyle" TargetType="Button">
  29. <Setter Property="Foreground" Value="White" />
  30. <Setter Property="FontSize" Value="24" />
  31. <Setter Property="FontFamily" Value="../../Fonts/#iconfont" />
  32. <Setter Property="Template">
  33. <Setter.Value>
  34. <ControlTemplate TargetType="Button">
  35. <Border Name="TitleBarBr" Background="Transparent">
  36. <ContentPresenter
  37. Margin="{TemplateBinding Margin}"
  38. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  39. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  40. </Border>
  41. <ControlTemplate.Triggers>
  42. <Trigger Property="IsMouseOver" Value="true">
  43. <Setter TargetName="TitleBarBr" Property="Background" Value="#22ffffff" />
  44. </Trigger>
  45. </ControlTemplate.Triggers>
  46. </ControlTemplate>
  47. </Setter.Value>
  48. </Setter>
  49. </Style>
  50. <!--#endregion-->
  51. <!--#region 导航栏样式-->
  52. <Style x:Key="NavButtonStyle" TargetType="{x:Type RadioButton}">
  53. <Setter Property="Foreground" Value="White" />
  54. <Setter Property="Template">
  55. <Setter.Value>
  56. <ControlTemplate TargetType="{x:Type RadioButton}">
  57. <Border
  58. x:Name="NvaBor"
  59. Background="Transparent"
  60. BorderBrush="#55ffffff"
  61. BorderThickness="0,0,0,1.5">
  62. <ContentControl
  63. Margin="10,4"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. HorizontalContentAlignment="Center"
  67. VerticalContentAlignment="Center"
  68. Content="{TemplateBinding Content}"
  69. FontSize="16" />
  70. </Border>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsChecked" Value="True">
  73. <Setter TargetName="NvaBor" Property="Background" Value="#865eec" />
  74. <Setter TargetName="NvaBor" Property="BorderThickness" Value="0,0,1.5,1.5" />
  75. </Trigger>
  76. <MultiTrigger>
  77. <MultiTrigger.Conditions>
  78. <Condition Property="IsChecked" Value="false" />
  79. <Condition Property="IsMouseOver" Value="True" />
  80. </MultiTrigger.Conditions>
  81. <MultiTrigger.Setters>
  82. <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
  83. </MultiTrigger.Setters>
  84. </MultiTrigger>
  85. </ControlTemplate.Triggers>
  86. </ControlTemplate>
  87. </Setter.Value>
  88. </Setter>
  89. </Style>
  90. <!--#endregion-->
  91. <!--#region 下拉列表单选按钮样式-->
  92. <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
  93. <Setter Property="Margin" Value="5,10,1,5" />
  94. <Setter Property="Width" Value="160" />
  95. <Setter Property="Height" Value="30" />
  96. <Setter Property="FontSize" Value="14" />
  97. <Setter Property="FontFamily" Value="粗体" />
  98. <Setter Property="Foreground" Value="#DDD" />
  99. <Setter Property="VerticalContentAlignment" Value="Center" />
  100. <Setter Property="HorizontalContentAlignment" Value="Center" />
  101. <Setter Property="BorderBrush" Value="Transparent" />
  102. <Setter Property="BorderThickness" Value="0" />
  103. <Setter Property="Background" Value="#DDD" />
  104. <Setter Property="HorizontalAlignment" Value="Right" />
  105. <Setter Property="Template">
  106. <Setter.Value>
  107. <ControlTemplate TargetType="{x:Type RadioButton}">
  108. <Grid
  109. x:Name="templateRoot"
  110. Background="Transparent"
  111. SnapsToDevicePixels="True">
  112. <Border x:Name="border2" />
  113. <ContentPresenter
  114. x:Name="contentPresenter"
  115. Margin="{TemplateBinding Padding}"
  116. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  117. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  118. Content="{TemplateBinding Content}"
  119. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  120. ContentTemplate="{TemplateBinding ContentTemplate}"
  121. Focusable="False"
  122. RecognizesAccessKey="True"
  123. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  124. </Grid>
  125. <ControlTemplate.Triggers>
  126. <Trigger Property="HasContent" Value="True">
  127. <Setter Property="FocusVisualStyle">
  128. <Setter.Value>
  129. <Style>
  130. <Setter Property="Control.Template">
  131. <Setter.Value>
  132. <ControlTemplate>
  133. <Rectangle
  134. Margin="14,0,0,0"
  135. SnapsToDevicePixels="True"
  136. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  137. StrokeDashArray="1 2"
  138. StrokeThickness="1" />
  139. </ControlTemplate>
  140. </Setter.Value>
  141. </Setter>
  142. </Style>
  143. </Setter.Value>
  144. </Setter>
  145. <Setter Property="Padding" Value="4,-1,0,0" />
  146. </Trigger>
  147. <Trigger Property="IsChecked" Value="{x:Null}" />
  148. <Trigger Property="IsChecked" Value="true">
  149. <Setter Property="Foreground" Value="White" />
  150. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}">
  151. <!--<Setter.Value>
  152. <ImageBrush ImageSource="./images/back.png" />
  153. </Setter.Value>-->
  154. </Setter>
  155. </Trigger>
  156. <Trigger Property="IsChecked" Value="false">
  157. <Setter TargetName="border2" Property="Background" Value="#101F3F" />
  158. <Setter Property="Foreground" Value="#4B8EC4" />
  159. </Trigger>
  160. <MultiTrigger>
  161. <MultiTrigger.Conditions>
  162. <Condition Property="IsChecked" Value="false" />
  163. <Condition Property="IsMouseOver" Value="True" />
  164. </MultiTrigger.Conditions>
  165. <MultiTrigger.Setters>
  166. <Setter TargetName="border2" Property="Background" Value="#55007acc" />
  167. </MultiTrigger.Setters>
  168. </MultiTrigger>
  169. </ControlTemplate.Triggers>
  170. </ControlTemplate>
  171. </Setter.Value>
  172. </Setter>
  173. </Style>
  174. <!--#endregion-->
  175. <!--#region 下拉列表样式-->
  176. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  177. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  178. <Setter Property="Height" Value="80" />
  179. <Setter Property="HorizontalContentAlignment" Value="Right" />
  180. <Setter Property="VerticalContentAlignment" Value="Center" />
  181. <Setter Property="Padding" Value="10,10" />
  182. <Setter Property="Template">
  183. <Setter.Value>
  184. <ControlTemplate TargetType="{x:Type ToggleButton}">
  185. <Grid>
  186. <Border
  187. x:Name="border2"
  188. Margin="{TemplateBinding Padding}"
  189. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  190. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  191. Background="{TemplateBinding Background}">
  192. <ContentPresenter
  193. Margin="{TemplateBinding Padding}"
  194. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  195. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  196. RecognizesAccessKey="True"
  197. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  198. </Border>
  199. </Grid>
  200. <ControlTemplate.Triggers>
  201. <Trigger Property="IsPressed" Value="true">
  202. <Setter Property="Background" Value="#FFd2e7f4" />
  203. </Trigger>
  204. <Trigger Property="IsChecked" Value="true">
  205. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
  206. </Trigger>
  207. <Trigger Property="IsChecked" Value="false">
  208. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  209. </Trigger>
  210. <Trigger Property="IsEnabled" Value="false">
  211. <Setter Property="Foreground" Value="White" />
  212. </Trigger>
  213. </ControlTemplate.Triggers>
  214. </ControlTemplate>
  215. </Setter.Value>
  216. </Setter>
  217. </Style>
  218. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  219. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  220. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  221. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  222. <Setter Property="BorderBrush" Value="Transparent" />
  223. <Setter Property="BorderThickness" Value="1" />
  224. <Setter Property="Template">
  225. <Setter.Value>
  226. <ControlTemplate TargetType="{x:Type Expander}">
  227. <DockPanel>
  228. <ToggleButton
  229. x:Name="HeaderSite"
  230. Height="60"
  231. MinWidth="0"
  232. MinHeight="0"
  233. Margin="1"
  234. Padding="{TemplateBinding Padding}"
  235. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  236. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  237. Content="{TemplateBinding Header}"
  238. ContentTemplate="{TemplateBinding HeaderTemplate}"
  239. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  240. DockPanel.Dock="Top"
  241. FontFamily="{TemplateBinding FontFamily}"
  242. FontSize="{TemplateBinding FontSize}"
  243. FontStretch="{TemplateBinding FontStretch}"
  244. FontStyle="{TemplateBinding FontStyle}"
  245. FontWeight="{TemplateBinding FontWeight}"
  246. Foreground="{TemplateBinding Foreground}"
  247. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  248. Style="{StaticResource ToggleButtonStyle}" />
  249. <ContentPresenter
  250. x:Name="ExpandSite"
  251. Margin="{TemplateBinding Padding}"
  252. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  253. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  254. DockPanel.Dock="Left"
  255. Focusable="false"
  256. Visibility="Collapsed" />
  257. </DockPanel>
  258. <ControlTemplate.Triggers>
  259. <Trigger Property="IsExpanded" Value="true">
  260. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  261. </Trigger>
  262. </ControlTemplate.Triggers>
  263. </ControlTemplate>
  264. </Setter.Value>
  265. </Setter>
  266. </Style>
  267. <!--#endregion-->
  268. <Style x:Key="checkBoxStyle" TargetType="CheckBox">
  269. <Setter Property="Foreground" Value="#a2c2e8" />
  270. <Setter Property="VerticalContentAlignment" Value="Center" />
  271. <Setter Property="FocusVisualStyle">
  272. <Setter.Value>
  273. <Style>
  274. <Setter Property="Control.Template">
  275. <Setter.Value>
  276. <ControlTemplate>
  277. <Rectangle
  278. Margin="1"
  279. SnapsToDevicePixels="True"
  280. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  281. StrokeDashArray="1 2"
  282. StrokeThickness="1" />
  283. </ControlTemplate>
  284. </Setter.Value>
  285. </Setter>
  286. </Style>
  287. </Setter.Value>
  288. </Setter>
  289. <Setter Property="Template">
  290. <Setter.Value>
  291. <ControlTemplate TargetType="{x:Type CheckBox}">
  292. <StackPanel
  293. Background="Transparent"
  294. Orientation="Horizontal"
  295. SnapsToDevicePixels="True">
  296. <Grid>
  297. <Image
  298. Width="12"
  299. Height="14"
  300. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  301. <Image
  302. x:Name="image1"
  303. Width="12"
  304. Height="14"
  305. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  306. </Grid>
  307. <ContentPresenter
  308. Margin="{TemplateBinding Padding}"
  309. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  310. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  311. Content="{TemplateBinding Content}"
  312. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  313. RecognizesAccessKey="True"
  314. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  315. </StackPanel>
  316. <ControlTemplate.Triggers>
  317. <Trigger Property="HasContent" Value="True">
  318. <Setter Property="FocusVisualStyle">
  319. <Setter.Value>
  320. <Style>
  321. <Setter Property="Control.Template">
  322. <Setter.Value>
  323. <ControlTemplate>
  324. <Rectangle
  325. Margin="14,0,0,0"
  326. SnapsToDevicePixels="True"
  327. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  328. StrokeDashArray="1 2"
  329. StrokeThickness="1" />
  330. </ControlTemplate>
  331. </Setter.Value>
  332. </Setter>
  333. </Style>
  334. </Setter.Value>
  335. </Setter>
  336. <Setter Property="Padding" Value="4,0,0,0" />
  337. </Trigger>
  338. <Trigger Property="IsEnabled" Value="False">
  339. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  340. </Trigger>
  341. <Trigger Property="IsChecked" Value="true">
  342. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_Checked.png" />
  343. </Trigger>
  344. <Trigger Property="IsChecked" Value="{x:Null}">
  345. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  346. </Trigger>
  347. </ControlTemplate.Triggers>
  348. </ControlTemplate>
  349. </Setter.Value>
  350. </Setter>
  351. </Style>
  352. <Style x:Key="StatusBtnStyle告警" TargetType="ToggleButton">
  353. <Style.Setters>
  354. <Setter Property="Width" Value="30" />
  355. <Setter Property="Height" Value="19" />
  356. <Setter Property="Cursor" Value="Hand" />
  357. <Setter Property="IsChecked" Value="{Binding IsCheck, Mode=TwoWay}" />
  358. <Setter Property="Template">
  359. <Setter.Value>
  360. <ControlTemplate TargetType="ToggleButton">
  361. <Grid Cursor="Hand">
  362. <Border
  363. x:Name="bd1"
  364. Width="25"
  365. Height="13"
  366. Margin="0,-10,-5,0"
  367. HorizontalAlignment="Right"
  368. VerticalAlignment="Top"
  369. Panel.ZIndex="100"
  370. Background="#2600CAFF"
  371. CornerRadius="3"
  372. Cursor="Hand"
  373. Visibility="Collapsed">
  374. <TextBlock
  375. HorizontalAlignment="Center"
  376. FontSize="8"
  377. Foreground="#FF00E6F7"
  378. Text="{Binding ListNum, Mode=TwoWay}" />
  379. <!-- -->
  380. </Border>
  381. <Image
  382. x:Name="image1"
  383. Width="{TemplateBinding Width}"
  384. Height="{TemplateBinding Height}"
  385. Panel.ZIndex="0"
  386. RenderOptions.BitmapScalingMode="HighQuality"
  387. SnapsToDevicePixels="True"
  388. Source="/BPASmartClient.CustomResource;component/Image/告警/无告警.png"
  389. UseLayoutRounding="True" />
  390. </Grid>
  391. <ControlTemplate.Triggers>
  392. <Trigger Property="IsChecked" Value="true">
  393. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/告警/严重告警.png" />
  394. <Setter TargetName="bd1" Property="Visibility" Value="Visible" />
  395. </Trigger>
  396. <Trigger Property="IsChecked" Value="False">
  397. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/告警/无告警.png" />
  398. <Setter TargetName="bd1" Property="Visibility" Value="Collapsed" />
  399. </Trigger>
  400. <MultiDataTrigger>
  401. <MultiDataTrigger.Conditions>
  402. <Condition Binding="{Binding IsCheck}" Value="true" />
  403. <Condition Binding="{Binding IsAlarm}" Value="true" />
  404. </MultiDataTrigger.Conditions>
  405. <MultiDataTrigger.Setters>
  406. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/告警/严重告警.png" />
  407. <Setter TargetName="bd1" Property="Visibility" Value="Visible" />
  408. </MultiDataTrigger.Setters>
  409. </MultiDataTrigger>
  410. </ControlTemplate.Triggers>
  411. </ControlTemplate>
  412. </Setter.Value>
  413. </Setter>
  414. </Style.Setters>
  415. </Style>
  416. </Window.Resources>
  417. <Grid Background="#103153">
  418. <Grid.ColumnDefinitions>
  419. <ColumnDefinition Width="764*" />
  420. <ColumnDefinition Width="104*" />
  421. <ColumnDefinition Width="28*" />
  422. <ColumnDefinition Width="41*" />
  423. <ColumnDefinition Width="263*" />
  424. </Grid.ColumnDefinitions>
  425. <Grid.RowDefinitions>
  426. <RowDefinition Height="50" />
  427. <RowDefinition />
  428. </Grid.RowDefinitions>
  429. <!--#region 标题栏设置-->
  430. <Border
  431. x:Name="MoveBorder"
  432. Grid.ColumnSpan="5"
  433. Height="50"
  434. VerticalAlignment="Center"
  435. Background="#0C2349"
  436. BorderBrush="#55ffffff"
  437. BorderThickness="0,0,0,1">
  438. <StackPanel Orientation="Horizontal">
  439. <Image Margin="15,5,0,5" Source="../../Image/HBL.png" />
  440. <TextBlock
  441. Name="tbTitle"
  442. Margin="20,0"
  443. HorizontalAlignment="Left"
  444. VerticalAlignment="Center"
  445. FontSize="18"
  446. Foreground="White"
  447. Text="自动化产线上位机控制系统软件 V1.0" />
  448. </StackPanel>
  449. </Border>
  450. <UniformGrid
  451. Grid.Column="4"
  452. Width="150"
  453. Height="50"
  454. Margin="113,0,0,0"
  455. HorizontalAlignment="Right"
  456. Columns="3">
  457. <Button
  458. Name="ButMin"
  459. Content="&#xe664;"
  460. IsEnabled="False"
  461. Style="{StaticResource TitleBarStyle}"
  462. Visibility="Hidden" />
  463. <Button
  464. Name="ButMax"
  465. Content="&#xe65d;"
  466. FontSize="22"
  467. IsEnabled="False"
  468. Style="{StaticResource TitleBarStyle}"
  469. Visibility="Hidden" />
  470. <Button
  471. Name="ButClose"
  472. Content="&#xe679;"
  473. Foreground="Red"
  474. Style="{StaticResource TitleBarStyle}" />
  475. </UniformGrid>
  476. <!--#endregion-->
  477. <!--#region 显示区设置-->
  478. <Grid Grid.Row="1" Grid.ColumnSpan="5">
  479. <Grid.ColumnDefinitions>
  480. <ColumnDefinition Width="200" />
  481. <ColumnDefinition />
  482. </Grid.ColumnDefinitions>
  483. <!-- 侧边栏菜单设置 -->
  484. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  485. <Grid>
  486. <Border BorderBrush="#121F40" BorderThickness="1">
  487. <Border.Background>
  488. <ImageBrush ImageSource="../../Image/leftback.png" />
  489. </Border.Background>
  490. </Border>
  491. <ScrollViewer
  492. Name="scroll"
  493. Grid.Row="1"
  494. Margin="10"
  495. HorizontalScrollBarVisibility="Hidden"
  496. VerticalScrollBarVisibility="Hidden">
  497. <ItemsControl ItemsSource="{Binding menuModels}">
  498. <ItemsControl.ItemTemplate>
  499. <DataTemplate>
  500. <Grid Visibility="{Binding MainMenuVisibility}">
  501. <Expander x:Name="E1" Style="{DynamicResource ExpanderStyle}">
  502. <Expander.Header>
  503. <StackPanel
  504. Margin="10,0,0,10"
  505. HorizontalAlignment="Left"
  506. VerticalAlignment="Center"
  507. Orientation="Horizontal">
  508. <TextBlock
  509. VerticalAlignment="Center"
  510. FontFamily="../../Fonts/#iconfont"
  511. FontSize="25"
  512. Foreground="#ddd"
  513. Text="{Binding MainMenuIcon, Converter={StaticResource StringToIconConverter}}" />
  514. <StackPanel Margin="10,0,0,0" VerticalAlignment="Center">
  515. <TextBlock
  516. FontSize="16"
  517. Foreground="White"
  518. Text="{Binding MainMenuName}" />
  519. <TextBlock
  520. FontSize="13"
  521. Foreground="Gray"
  522. Text="{Binding Alias}" />
  523. </StackPanel>
  524. </StackPanel>
  525. </Expander.Header>
  526. <Expander.Content>
  527. <StackPanel>
  528. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  529. <ItemsControl ItemsSource="{Binding subMenumodels}">
  530. <ItemsControl.ItemTemplate>
  531. <DataTemplate>
  532. <RadioButton
  533. Command="{Binding DataContext.NavChangedCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  534. CommandParameter="{Binding}"
  535. Content="{Binding SubMenuName}"
  536. GroupName="All"
  537. Style="{StaticResource RadioMiniButtonStyle}"
  538. Visibility="{Binding SubMenuVisibility}" />
  539. </DataTemplate>
  540. </ItemsControl.ItemTemplate>
  541. </ItemsControl>
  542. </ScrollViewer>
  543. </StackPanel>
  544. </Expander.Content>
  545. </Expander>
  546. </Grid>
  547. </DataTemplate>
  548. </ItemsControl.ItemTemplate>
  549. </ItemsControl>
  550. </ScrollViewer>
  551. </Grid>
  552. </ScrollViewer>
  553. <!--#endregion-->
  554. <!--#region 页面显示-->
  555. <Grid Grid.Column="1">
  556. <Grid.Background>
  557. <ImageBrush ImageSource="../../Image/WindowImages.png" />
  558. </Grid.Background>
  559. <Grid.RowDefinitions>
  560. <RowDefinition Height="0.1*" />
  561. <RowDefinition />
  562. </Grid.RowDefinitions>
  563. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  564. <ToggleButton
  565. Margin="0,0,8,0"
  566. HorizontalAlignment="Center"
  567. VerticalAlignment="Center"
  568. Cursor="Hand"
  569. IsChecked="{Binding IsAlarm}"
  570. Style="{DynamicResource StatusBtnStyle告警}"
  571. ToolTip="心跳检测报警" />
  572. <CheckBox
  573. Margin="5,0,8,0"
  574. Content="开机启动"
  575. IsChecked="{Binding AutoStart}"
  576. Style="{StaticResource checkBoxStyle}" />
  577. <!--<CheckBox
  578. Margin="5,0,5,0"
  579. Content="设备初始化"
  580. IsChecked="{Binding Status}"
  581. Style="{StaticResource checkBoxStyle}" />-->
  582. </StackPanel>
  583. <TextBlock
  584. Margin="0,0,0,20"
  585. HorizontalAlignment="Center"
  586. VerticalAlignment="Center"
  587. FontSize="20"
  588. Foreground="#1A8ADE"
  589. Text="{Binding DisplayName}" />
  590. <TextBlock
  591. Margin="10,10,0,5"
  592. HorizontalAlignment="left"
  593. VerticalAlignment="Center"
  594. FontSize="18"
  595. Foreground="#1A8ADE"
  596. Text="{Binding DateVisible}" />
  597. <TextBlock
  598. Margin="0,10,50,5"
  599. HorizontalAlignment="Right"
  600. VerticalAlignment="Center"
  601. FontSize="18"
  602. Foreground="#1A8ADE"
  603. Text="{Binding TimeVisible}" />
  604. <ContentControl
  605. Grid.Row="1"
  606. Width="auto"
  607. Height="auto"
  608. Content="{Binding MainContent}" />
  609. </Grid>
  610. <!--#endregion-->
  611. </Grid>
  612. <!--#endregion-->
  613. </Grid>
  614. </Window>