WindturbineInfoWindow.xaml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <Window x:Class="NEIntelligentControl2.Windows.WindturbineInfoWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Windows"
  7. xmlns:vw="clr-namespace:NEIntelligentControl2.Views.Infos"
  8. xmlns:am="clr-namespace:NEIntelligentControl2.Views.Alarm"
  9. mc:Ignorable="d"
  10. Title="风机详情" Height="722" Width="1306" Background="#FF454545" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded">
  11. <WindowChrome.WindowChrome>
  12. <WindowChrome/>
  13. </WindowChrome.WindowChrome>
  14. <Window.Resources>
  15. <Style TargetType="{x:Type ScrollBar}">
  16. <Setter Property="Background" Value="#77F0F8FF"/>
  17. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  18. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  19. <!--滚动条宽度-->
  20. <Setter Property="Width" Value="8"/>
  21. <Setter Property="MinWidth" Value="6"/>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type ScrollBar}">
  25. <!--滚动条背景色-->
  26. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true" Width="8">
  27. <Grid.RowDefinitions>
  28. <RowDefinition />
  29. </Grid.RowDefinitions>
  30. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
  31. <Track.DecreaseRepeatButton>
  32. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  33. </Track.DecreaseRepeatButton>
  34. <Track.IncreaseRepeatButton>
  35. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  36. </Track.IncreaseRepeatButton>
  37. <Track.Thumb>
  38. <Thumb Style="{StaticResource ScrollBarThumb}"/>
  39. </Track.Thumb>
  40. </Track>
  41. </Grid>
  42. <ControlTemplate.Triggers>
  43. <Trigger Property="IsEnabled" Value="false">
  44. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. <Style.Triggers>
  51. <Trigger Property="Orientation" Value="Horizontal">
  52. <Setter Property="Width" Value="Auto"/>
  53. <Setter Property="MinWidth" Value="0"/>
  54. <Setter Property="Height" Value="6"/>
  55. <Setter Property="MinHeight" Value="6"/>
  56. <Setter Property="Background" Value="#77F0F8FF"/>
  57. <Setter Property="Template">
  58. <Setter.Value>
  59. <ControlTemplate TargetType="{x:Type ScrollBar}">
  60. <Grid x:Name="Bg" Background="Red" SnapsToDevicePixels="true">
  61. <Grid.ColumnDefinitions>
  62. <ColumnDefinition />
  63. </Grid.ColumnDefinitions>
  64. <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
  65. <Track.DecreaseRepeatButton>
  66. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  67. </Track.DecreaseRepeatButton>
  68. <Track.IncreaseRepeatButton>
  69. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  70. </Track.IncreaseRepeatButton>
  71. <Track.Thumb>
  72. <Thumb Style="{StaticResource ScrollBarThumb}" />
  73. </Track.Thumb>
  74. </Track>
  75. </Grid>
  76. <ControlTemplate.Triggers>
  77. <Trigger Property="IsEnabled" Value="false">
  78. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  79. </Trigger>
  80. </ControlTemplate.Triggers>
  81. </ControlTemplate>
  82. </Setter.Value>
  83. </Setter>
  84. </Trigger>
  85. </Style.Triggers>
  86. </Style>
  87. </Window.Resources>
  88. <Grid>
  89. <Grid>
  90. <Grid.RowDefinitions>
  91. <RowDefinition Height="Auto"/>
  92. <RowDefinition/>
  93. </Grid.RowDefinitions>
  94. <TextBlock x:Name="_TBTitle" Text="操作详情" Margin="5" FontSize="14" Foreground="WhiteSmoke" HorizontalAlignment="Left"/>
  95. <!--<Border Grid.Row="1" Background="#FFF9F9F9" Margin="5" CornerRadius="7">
  96. <vw:WindturbineDetails x:Name="_WDMain" Margin="5"/>
  97. </Border>-->
  98. <Border Grid.Row="1" Background="#FFF9F9F9" Margin="5" CornerRadius="7">
  99. <TabControl Background="{x:Null}" Margin="3">
  100. <TabItem Header="主要参数">
  101. <vw:WindturbineDetails x:Name="_WDMain" Margin="5"/>
  102. </TabItem>
  103. <TabItem Header="测点详情">
  104. <vw:PointDetails x:Name="_PDMain" Margin="5"/>
  105. </TabItem>
  106. <!--<TabItem Header="实时报警">
  107. <am:WindturbineRealTimeAlarm x:Name="_WAR"/>
  108. </TabItem>
  109. <TabItem Header="历史报警">
  110. <am:WindturbineHistoryAlarm x:Name="_WAH"/>
  111. </TabItem> -->
  112. <TabItem Header="报警信息">
  113. <am:WindturbineHistoryAlarm x:Name="_WAC"/>
  114. </TabItem>
  115. <!--<TabItem Header="状态变化">
  116. <vw:StateChange x:Name="_SC"/>
  117. </TabItem>-->
  118. </TabControl>
  119. </Border>
  120. <Button Grid.ColumnSpan="2" Height="25" Width="51.8" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="3,0" BorderBrush="{x:Null}" Foreground="{x:Null}" Padding="0,0,0,0" BorderThickness="0,0,0,0" Background="{x:Null}" Click="Button_Click" Tag="close" WindowChrome.IsHitTestVisibleInChrome="True">
  121. <Image Source="pack://application:,,,/智动启停;component/Images/PV/close.png"/>
  122. </Button>
  123. </Grid>
  124. </Grid>
  125. </Window>