App.xaml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <Application x:Class="SWRIS.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:SWRIS"
  5. xmlns:pu="https://opensource.panuon.com/wpf-ui"
  6. xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
  7. <Application.Resources>
  8. <ResourceDictionary>
  9. <FontFamily x:Key="PuHuiTiBold">pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Bold.ttf#Alibaba PuHuiTi</FontFamily>
  10. <FontFamily x:Key="PuHuiTiRegular">pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Medium.ttf#Alibaba PuHuiTi</FontFamily>
  11. <FontFamily x:Key="PuHuiTiMedium">pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Regular.ttf#Alibaba PuHuiTi</FontFamily>
  12. <FontFamily x:Key="PanuonIconFont">pack://application:,,,/SWRIS;component/Fonts/PanuonIcon.ttf#PanuonIcon</FontFamily>
  13. <ResourceDictionary.MergedDictionaries>
  14. <pu:StyleDictionary Includes="All" />
  15. <ResourceDictionary Source="pack://application:,,,/SWRIS;component/Styles/Styles.xaml" />
  16. <ResourceDictionary>
  17. <pu:MessageBoxXSettings x:Key="messageSetting">
  18. <pu:MessageBoxXSettings.WindowXStyle>
  19. <Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
  20. <Setter Property="SizeToContent" Value="Manual" />
  21. <Setter Property="Width" Value="600" />
  22. <Setter Property="Height" Value="320" />
  23. <Setter Property="FontSize" Value="22"/>
  24. <Setter Property="FontWeight" Value="Medium"/>
  25. <Setter Property="FontFamily">
  26. <Setter.Value>
  27. <FontFamily>pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Medium.ttf#Alibaba PuHuiTi</FontFamily>
  28. </Setter.Value>
  29. </Setter>
  30. <Setter Property="Background" Value="#141332" />
  31. <Setter Property="Foreground" Value="#FFFFFF" />
  32. <Setter Property="BorderBrush" Value="#615CDD"/>
  33. <Setter Property="BorderThickness" Value="1"/>
  34. </Style>
  35. </pu:MessageBoxXSettings.WindowXStyle>
  36. <pu:MessageBoxXSettings.ButtonStyle>
  37. <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
  38. <Setter Property="pu:ButtonHelper.CornerRadius" Value="10" />
  39. <Setter Property="Width" Value="100"/>
  40. <Setter Property="Height" Value="50"/>
  41. <Setter Property="Margin" Value="10,0"/>
  42. <Setter Property="FontFamily">
  43. <Setter.Value>
  44. <FontFamily>pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Medium.ttf#Alibaba PuHuiTi</FontFamily>
  45. </Setter.Value>
  46. </Setter>
  47. <Style.Triggers>
  48. <Trigger Property="IsDefault" Value="True">
  49. <Setter Property="Foreground" Value="#FFFFFF" />
  50. <Setter Property="Background">
  51. <Setter.Value>
  52. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  53. <GradientStop Color="#4E38F0" Offset="0.6"/>
  54. <GradientStop Color="#736AFA" Offset="1.2"/>
  55. </LinearGradientBrush>
  56. </Setter.Value>
  57. </Setter>
  58. </Trigger>
  59. <Trigger Property="IsDefault" Value="False">
  60. <Setter Property="Foreground" Value="#FFFFFF" />
  61. <Setter Property="Background">
  62. <Setter.Value>
  63. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  64. <GradientStop Color="#615E7C" Offset="0.6"/>
  65. <GradientStop Color="#807E9F" Offset="1.2"/>
  66. </LinearGradientBrush>
  67. </Setter.Value>
  68. </Setter>
  69. </Trigger>
  70. </Style.Triggers>
  71. </Style>
  72. </pu:MessageBoxXSettings.ButtonStyle>
  73. </pu:MessageBoxXSettings>
  74. <pu:NoticeBoxSettings x:Key="noticeSetting" Position="BottomRight">
  75. <pu:NoticeBoxSettings.NoticeBoxItemStyle>
  76. <Style TargetType="pu:NoticeBoxItem" BasedOn="{StaticResource {x:Static pu:NoticeBox.NoticeBoxItemStyleKey}}">
  77. <Setter Property="Background" Value="#141332" />
  78. <Setter Property="BorderBrush" Value="#615CDD" />
  79. <Setter Property="FontSize" Value="18"/>
  80. <Setter Property="FontWeight" Value="Medium"/>
  81. <Setter Property="FontFamily">
  82. <Setter.Value>
  83. <FontFamily>pack://application:,,,/SWRIS;component/Fonts/Alibaba-PuHuiTi-Medium.ttf#Alibaba PuHuiTi</FontFamily>
  84. </Setter.Value>
  85. </Setter>
  86. <Setter Property="Margin" Value="5,5"/>
  87. <Setter Property="CornerRadius" Value="5"/>
  88. <Setter Property="Foreground" Value="#FFFFFF" />
  89. <Setter Property="Width" Value="350" />
  90. <Setter Property="Height" Value="150" />
  91. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  92. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  93. </Style>
  94. </pu:NoticeBoxSettings.NoticeBoxItemStyle>
  95. </pu:NoticeBoxSettings>
  96. <pu:PendingBoxSettings x:Key="pendingSetting">
  97. <pu:PendingBoxSettings.WindowStyle>
  98. <Style BasedOn="{StaticResource {x:Static pu:PendingBox.WindowStyleKey}}" TargetType="Window">
  99. <Setter Property="SizeToContent" Value="Manual" />
  100. <Setter Property="Width" Value="400" />
  101. <Setter Property="Height" Value="200" />
  102. <Setter Property="Background" Value="{DynamicResource WindowBackground}" />
  103. <Setter Property="Foreground" Value="{DynamicResource BodyForeground}" />
  104. </Style>
  105. </pu:PendingBoxSettings.WindowStyle>
  106. <pu:PendingBoxSettings.SpinStyle>
  107. <Style BasedOn="{StaticResource {x:Static pu:PendingBox.SpinStyleKey}}" TargetType="pu:Spin">
  108. <Setter Property="SpinStyle" Value="Ring2" />
  109. <Setter Property="GlyphBrush" Value="#6CBCEA" />
  110. </Style>
  111. </pu:PendingBoxSettings.SpinStyle>
  112. <pu:PendingBoxSettings.CancelButtonStyle>
  113. <Style BasedOn="{StaticResource {x:Static pu:PendingBox.CancelButtonStyleKey}}" TargetType="Button">
  114. <Setter Property="Background" Value="#6CBCEA" />
  115. <Setter Property="Foreground" Value="White" />
  116. <Setter Property="Height" Value="30" />
  117. <Style.Triggers>
  118. <Trigger Property="IsPressed" Value="True">
  119. <Setter Property="Background" Value="#6CABEA" />
  120. </Trigger>
  121. </Style.Triggers>
  122. </Style>
  123. </pu:PendingBoxSettings.CancelButtonStyle>
  124. </pu:PendingBoxSettings>
  125. <pu:ToastSettings x:Key="toastSetting" Spacing="25">
  126. <pu:ToastSettings.LabelStyle>
  127. <Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
  128. <Setter Property="Background" Value="{DynamicResource ToastBackground}"/>
  129. <Setter Property="Foreground" Value="{DynamicResource ToastForeground}"/>
  130. </Style>
  131. </pu:ToastSettings.LabelStyle>
  132. </pu:ToastSettings>
  133. </ResourceDictionary>
  134. </ResourceDictionary.MergedDictionaries>
  135. </ResourceDictionary>
  136. </Application.Resources>
  137. </Application>