MessageWindowBig.xaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <Window x:Class="NEIntelligentControl2.Windows.MessageWindowBig"
  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="MessageWindowBig" Height="375" Width="666.666667" WindowStartupLocation="CenterOwner">
  9. <Window.Resources>
  10. <Style TargetType="{x:Type ScrollBar}">
  11. <Setter Property="Background" Value="#77F0F8FF"/>
  12. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  13. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  14. <!--滚动条宽度-->
  15. <Setter Property="Width" Value="8"/>
  16. <Setter Property="MinWidth" Value="6"/>
  17. <Setter Property="Template">
  18. <Setter.Value>
  19. <ControlTemplate TargetType="{x:Type ScrollBar}">
  20. <!--滚动条背景色-->
  21. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true" Width="8">
  22. <Grid.RowDefinitions>
  23. <RowDefinition />
  24. </Grid.RowDefinitions>
  25. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
  26. <Track.DecreaseRepeatButton>
  27. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  28. </Track.DecreaseRepeatButton>
  29. <Track.IncreaseRepeatButton>
  30. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  31. </Track.IncreaseRepeatButton>
  32. <Track.Thumb>
  33. <Thumb Style="{StaticResource ScrollBarThumb}"/>
  34. </Track.Thumb>
  35. </Track>
  36. </Grid>
  37. <ControlTemplate.Triggers>
  38. <Trigger Property="IsEnabled" Value="false">
  39. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  40. </Trigger>
  41. </ControlTemplate.Triggers>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. <Style.Triggers>
  46. <Trigger Property="Orientation" Value="Horizontal">
  47. <Setter Property="Width" Value="Auto"/>
  48. <Setter Property="MinWidth" Value="0"/>
  49. <Setter Property="Height" Value="6"/>
  50. <Setter Property="MinHeight" Value="6"/>
  51. <Setter Property="Background" Value="#77F0F8FF"/>
  52. <Setter Property="Template">
  53. <Setter.Value>
  54. <ControlTemplate TargetType="{x:Type ScrollBar}">
  55. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition />
  58. </Grid.ColumnDefinitions>
  59. <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
  60. <Track.DecreaseRepeatButton>
  61. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  62. </Track.DecreaseRepeatButton>
  63. <Track.IncreaseRepeatButton>
  64. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  65. </Track.IncreaseRepeatButton>
  66. <Track.Thumb>
  67. <Thumb Style="{StaticResource ScrollBarThumb}" />
  68. </Track.Thumb>
  69. </Track>
  70. </Grid>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsEnabled" Value="false">
  73. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  74. </Trigger>
  75. </ControlTemplate.Triggers>
  76. </ControlTemplate>
  77. </Setter.Value>
  78. </Setter>
  79. </Trigger>
  80. </Style.Triggers>
  81. </Style>
  82. </Window.Resources>
  83. <Grid>
  84. <Grid.RowDefinitions>
  85. <RowDefinition/>
  86. <RowDefinition Height="Auto"/>
  87. </Grid.RowDefinitions>
  88. <Grid>
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="Auto"/>
  91. <ColumnDefinition/>
  92. </Grid.ColumnDefinitions>
  93. <Viewbox Width="35" Height="35" Margin="5">
  94. <Canvas Width="1024" Height="1024">
  95. <Path Data="M512 85.333333c235.648 0 426.666667 191.018667 426.666667 426.666667s-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333z m0 170.666667a42.666667 42.666667 0 0 0-42.666667 42.666667v341.333333a42.666667 42.666667 0 0 0 85.333334 0V298.666667a42.666667 42.666667 0 0 0-42.666667-42.666667z m0 554.666667a42.666667 42.666667 0 1 0 0-85.333334 42.666667 42.666667 0 0 0 0 85.333334z" Fill="#FAAD14"/>
  96. </Canvas>
  97. </Viewbox>
  98. <ScrollViewer Grid.Column="1">
  99. <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Message}" VerticalAlignment="Center"/>
  100. </ScrollViewer>
  101. </Grid>
  102. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0,10,0" HorizontalAlignment="Right">
  103. <Button Content="确 定" Margin="10" Padding="12,3" Click="Button_Click" Tag="ok" Style="{StaticResource ConfirmButtonStyle}"/>
  104. <Button Content="取 消" Margin="10" Padding="12,3" Click="Button_Click" Tag="cancel" Style="{StaticResource CancelButtonStyle}"/>
  105. </StackPanel>
  106. </Grid>
  107. </Window>