App.xaml 9.1 KB

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