终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

643 rindas
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.RowDefinitions>
  419. <RowDefinition Height="50" />
  420. <RowDefinition />
  421. </Grid.RowDefinitions>
  422. <!--#region 标题栏设置-->
  423. <Border
  424. x:Name="MoveBorder"
  425. Height="50"
  426. VerticalAlignment="Top"
  427. Background="#0C2349"
  428. BorderBrush="#55ffffff"
  429. BorderThickness="0,0,0,1">
  430. <StackPanel Orientation="Horizontal">
  431. <Image Margin="15,5,0,5" Source="../../Image/HBL.png" />
  432. <TextBlock
  433. Name="tbTitle"
  434. Margin="20,0"
  435. HorizontalAlignment="Left"
  436. VerticalAlignment="Center"
  437. FontSize="18"
  438. Foreground="White"
  439. Text="自动化产线上位机控制系统软件 V1.0" />
  440. </StackPanel>
  441. </Border>
  442. <UniformGrid
  443. Width="150"
  444. Height="50"
  445. HorizontalAlignment="Right"
  446. Columns="3">
  447. <Button
  448. Name="ButMin"
  449. Content="&#xe664;"
  450. IsEnabled="False"
  451. Style="{StaticResource TitleBarStyle}"
  452. Visibility="Hidden" />
  453. <Button
  454. Name="ButMax"
  455. Content="&#xe65d;"
  456. FontSize="22"
  457. IsEnabled="False"
  458. Style="{StaticResource TitleBarStyle}"
  459. Visibility="Hidden" />
  460. <Button
  461. Name="ButClose"
  462. Content="&#xe679;"
  463. Foreground="Red"
  464. Style="{StaticResource TitleBarStyle}" />
  465. </UniformGrid>
  466. <!--#endregion-->
  467. <!--#region 显示区设置-->
  468. <Grid Grid.Row="1">
  469. <Grid.ColumnDefinitions>
  470. <ColumnDefinition Width="200" />
  471. <ColumnDefinition />
  472. </Grid.ColumnDefinitions>
  473. <!-- 侧边栏菜单设置 -->
  474. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  475. <Grid>
  476. <Border BorderBrush="#121F40" BorderThickness="1">
  477. <Border.Background>
  478. <ImageBrush ImageSource="../../Image/leftback.png" />
  479. </Border.Background>
  480. </Border>
  481. <ScrollViewer
  482. Name="scroll"
  483. Grid.Row="1"
  484. Margin="10"
  485. HorizontalScrollBarVisibility="Hidden"
  486. VerticalScrollBarVisibility="Hidden">
  487. <ItemsControl ItemsSource="{Binding menuModels}">
  488. <ItemsControl.ItemTemplate>
  489. <DataTemplate>
  490. <Grid Visibility="{Binding MainMenuVisibility}">
  491. <Expander x:Name="E1" Style="{DynamicResource ExpanderStyle}">
  492. <Expander.Header>
  493. <StackPanel
  494. Margin="10,0,0,10"
  495. HorizontalAlignment="Left"
  496. VerticalAlignment="Center"
  497. Orientation="Horizontal">
  498. <TextBlock
  499. VerticalAlignment="Center"
  500. FontFamily="../../Fonts/#iconfont"
  501. FontSize="25"
  502. Foreground="#ddd"
  503. Text="{Binding MainMenuIcon, Converter={StaticResource StringToIconConverter}}" />
  504. <StackPanel Margin="10,0,0,0" VerticalAlignment="Center">
  505. <TextBlock
  506. FontSize="16"
  507. Foreground="White"
  508. Text="{Binding MainMenuName}" />
  509. <TextBlock
  510. FontSize="13"
  511. Foreground="Gray"
  512. Text="{Binding Alias}" />
  513. </StackPanel>
  514. </StackPanel>
  515. </Expander.Header>
  516. <Expander.Content>
  517. <StackPanel>
  518. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  519. <ItemsControl ItemsSource="{Binding subMenumodels}">
  520. <ItemsControl.ItemTemplate>
  521. <DataTemplate>
  522. <RadioButton
  523. Command="{Binding DataContext.NavChangedCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  524. CommandParameter="{Binding}"
  525. Content="{Binding SubMenuName}"
  526. GroupName="All"
  527. Style="{StaticResource RadioMiniButtonStyle}"
  528. Visibility="{Binding SubMenuVisibility}" />
  529. </DataTemplate>
  530. </ItemsControl.ItemTemplate>
  531. </ItemsControl>
  532. </ScrollViewer>
  533. </StackPanel>
  534. </Expander.Content>
  535. </Expander>
  536. </Grid>
  537. </DataTemplate>
  538. </ItemsControl.ItemTemplate>
  539. </ItemsControl>
  540. </ScrollViewer>
  541. </Grid>
  542. </ScrollViewer>
  543. <!--#endregion-->
  544. <!--#region 页面显示-->
  545. <Grid Grid.Column="1">
  546. <Grid.Background>
  547. <ImageBrush ImageSource="../../Image/WindowImages.png" />
  548. </Grid.Background>
  549. <Grid.RowDefinitions>
  550. <RowDefinition Height="0.1*" />
  551. <RowDefinition />
  552. </Grid.RowDefinitions>
  553. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  554. <ToggleButton
  555. Margin="0,0,8,0"
  556. HorizontalAlignment="Center"
  557. VerticalAlignment="Center"
  558. Cursor="Hand"
  559. IsChecked="{Binding IsAlarm}"
  560. Style="{DynamicResource StatusBtnStyle告警}"
  561. ToolTip="心跳检测报警" />
  562. <CheckBox
  563. Margin="5,0,8,0"
  564. Content="开机启动"
  565. IsChecked="{Binding AutoStart}"
  566. Style="{StaticResource checkBoxStyle}" />
  567. <!--<CheckBox
  568. Margin="5,0,5,0"
  569. Content="设备初始化"
  570. IsChecked="{Binding Status}"
  571. Style="{StaticResource checkBoxStyle}" />-->
  572. </StackPanel>
  573. <TextBlock
  574. Margin="0,0,0,20"
  575. HorizontalAlignment="Center"
  576. VerticalAlignment="Center"
  577. FontSize="20"
  578. Foreground="#1A8ADE"
  579. Text="{Binding DisplayName}" />
  580. <TextBlock
  581. Margin="10,10,0,5"
  582. HorizontalAlignment="left"
  583. VerticalAlignment="Center"
  584. FontSize="18"
  585. Foreground="#1A8ADE"
  586. Text="{Binding DateVisible}" />
  587. <TextBlock
  588. Margin="0,10,50,5"
  589. HorizontalAlignment="Right"
  590. VerticalAlignment="Center"
  591. FontSize="18"
  592. Foreground="#1A8ADE"
  593. Text="{Binding TimeVisible}" />
  594. <ContentControl
  595. Grid.Row="1"
  596. Width="auto"
  597. Height="auto"
  598. Content="{Binding MainContent}" />
  599. </Grid>
  600. <!--#endregion-->
  601. </Grid>
  602. <!--#endregion-->
  603. </Grid>
  604. </Window>