App.xaml 8.8 KB

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