ConfirmWindow.xaml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <Window x:Class="NEIntelligentControl2.Windows.ConfirmWindow"
  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. mc:Ignorable="d"
  8. Title="控制校验" Height="776" Width="1350" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" ResizeMode="NoResize" WindowStyle="None" Background="{x:Null}" Closing="Window_Closing">
  9. <WindowChrome.WindowChrome>
  10. <WindowChrome/>
  11. </WindowChrome.WindowChrome>
  12. <Window.Resources>
  13. <Style x:Key="GenerateButtonStyle" TargetType="{x:Type Button}">
  14. <Setter Property="Background" Value="#FFFE8864"/>
  15. <Setter Property="Foreground" Value="WhiteSmoke"/>
  16. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  17. <Setter Property="VerticalContentAlignment" Value="Center"/>
  18. <Setter Property="Padding" Value="17,6"/>
  19. <Setter Property="FontSize" Value="14"/>
  20. <Setter Property="BorderThickness" Value="0"/>
  21. <Setter Property="Margin" Value="20,0"/>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type Button}">
  25. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" CornerRadius="3">
  26. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  27. </Border>
  28. <ControlTemplate.Triggers>
  29. <Trigger Property="IsMouseOver" Value="true">
  30. <Setter Property="Background" TargetName="border" Value="#FFFE9777"/>
  31. </Trigger>
  32. <Trigger Property="IsPressed" Value="true">
  33. <Setter Property="Background" TargetName="border" Value="#FFFE8864"/>
  34. </Trigger>
  35. </ControlTemplate.Triggers>
  36. </ControlTemplate>
  37. </Setter.Value>
  38. </Setter>
  39. </Style>
  40. <Style x:Key="ConfirmButtonStyle" TargetType="{x:Type Button}">
  41. <Setter Property="Background" Value="#FF006ACC"/>
  42. <Setter Property="Foreground" Value="WhiteSmoke"/>
  43. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  44. <Setter Property="VerticalContentAlignment" Value="Center"/>
  45. <Setter Property="Padding" Value="17,6"/>
  46. <Setter Property="FontSize" Value="14"/>
  47. <Setter Property="BorderThickness" Value="0"/>
  48. <Setter Property="Margin" Value="20,0"/>
  49. <Setter Property="Template">
  50. <Setter.Value>
  51. <ControlTemplate TargetType="{x:Type Button}">
  52. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" CornerRadius="3">
  53. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  54. </Border>
  55. <ControlTemplate.Triggers>
  56. <Trigger Property="IsMouseOver" Value="true">
  57. <Setter Property="Background" TargetName="border" Value="#FF2E81CC"/>
  58. </Trigger>
  59. <Trigger Property="IsPressed" Value="true">
  60. <Setter Property="Background" TargetName="border" Value="#FF006ACC"/>
  61. </Trigger>
  62. </ControlTemplate.Triggers>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67. </Window.Resources>
  68. <Window.Effect>
  69. <DropShadowEffect ShadowDepth="0" RenderingBias="Quality" BlurRadius="7"/>
  70. </Window.Effect>
  71. <Grid Background="#FF454545" Margin="5">
  72. <Grid.RowDefinitions>
  73. <RowDefinition Height="Auto"/>
  74. <RowDefinition/>
  75. <RowDefinition/>
  76. <RowDefinition Height="Auto"/>
  77. </Grid.RowDefinitions>
  78. <TextBlock x:Name="_TBTitle" Foreground="WhiteSmoke" FontSize="15" Margin="5"/>
  79. <Grid Grid.Row="1" Margin="5,0">
  80. <Grid.RowDefinitions>
  81. <RowDefinition Height="Auto"/>
  82. <RowDefinition/>
  83. </Grid.RowDefinitions>
  84. <Border CornerRadius="7,7,0,0" Background="#FF5F5F5F">
  85. <TextBlock Text="校验通过" Margin="5" Foreground="WhiteSmoke"/>
  86. </Border>
  87. <Border Grid.Row="1" CornerRadius="0,0,7,7" Background="WhiteSmoke">
  88. <ScrollViewer Template="{DynamicResource ScrollViewerTemplate}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" Margin="0,0,0,5">
  89. <UniformGrid x:Name="_UGAllow" Columns="8" VerticalAlignment="Top" Margin="5">
  90. </UniformGrid>
  91. </ScrollViewer>
  92. </Border>
  93. </Grid>
  94. <Grid Grid.Row="2" Margin="5,10,5,0">
  95. <Grid.RowDefinitions>
  96. <RowDefinition Height="Auto"/>
  97. <RowDefinition/>
  98. </Grid.RowDefinitions>
  99. <Border CornerRadius="7,7,0,0" Background="#FF5F5F5F">
  100. <TextBlock Text="校验不通过" Margin="5" Foreground="WhiteSmoke"/>
  101. </Border>
  102. <Border Grid.Row="1" CornerRadius="0,0,7,7" Background="WhiteSmoke">
  103. <ScrollViewer Template="{DynamicResource ScrollViewerTemplate}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" Margin="0,0,0,5">
  104. <UniformGrid x:Name="_UGNotAllow" Columns="8" VerticalAlignment="Top">
  105. </UniformGrid>
  106. </ScrollViewer>
  107. </Border>
  108. </Grid>
  109. <StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Center">
  110. <Button Content="发 送" Style="{DynamicResource ConfirmButtonStyle}" Margin="10" Padding="12,3" Click="Button_Click" Tag="send"/>
  111. <Button Content="取 消" Style="{DynamicResource GenerateButtonStyle}" Margin="10" Padding="12,3" Click="Button_Click" Tag="cancel"/>
  112. </StackPanel>
  113. </Grid>
  114. </Window>