BaseStyle.xaml 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. 
  2. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  5. xmlns:button="clr-namespace:Muchinfo.WPF.Controls.Button;assembly=Client.WPF.Controls"
  6. xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  9. xmlns:system="clr-namespace:System;assembly=mscorlib"
  10. xmlns:windows="clr-namespace:Muchinfo.MTPClient.Infrastructure.Windows;assembly=Client.Infrastructure"
  11. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
  12. <converters:MarketVisibilityConventer x:Key="MarketVisibilityConventer" />
  13. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  14. <converters:BoolOpposedVisibility x:Key="BoolOpposedVisibility" />
  15. <!-- 字体 XS -->
  16. <system:Double x:Key="MuchinfoFontSize_XS">12</system:Double>
  17. <!-- 字体 S -->
  18. <system:Double x:Key="MuchinfoFontSize_S">13</system:Double>
  19. <!-- 字体 M -->
  20. <system:Double x:Key="MuchinfoFontSize_M">14</system:Double>
  21. <!-- 字体 L -->
  22. <system:Double x:Key="MuchinfoFontSize_L">16</system:Double>
  23. <!-- 字体 XL -->
  24. <system:Double x:Key="MuchinfoFontSize_XL">18</system:Double>
  25. <!-- 行情列表行高 -->
  26. <system:Double x:Key="QuoteDataGridRowHeight">32</system:Double>
  27. <!-- 行情列表表头行高 -->
  28. <system:Double x:Key="QuoteDataGridHeadRowHeight">32</system:Double>
  29. <!-- 账号列表行高 -->
  30. <system:Double x:Key="AccountDataGridHeadRowHeight">26</system:Double>
  31. <!-- 账号列表表头行高 -->
  32. <system:Double x:Key="AccountDataGridRowHeight">24</system:Double>
  33. <Style x:Key="NoBorderWindow" TargetType="{x:Type Window}">
  34. <!-- <Setter Property="AllowsTransparency" Value="false" /> -->
  35. <Setter Property="Background" Value="Transparent" />
  36. <Setter Property="FontFamily" Value="Microsoft YaHei,Simsun" />
  37. <Setter Property="FontSize" Value="{DynamicResource MuchinfoFontSize_XS}" />
  38. <Setter Property="WindowStyle" Value="None" />
  39. <Setter Property="WindowState" Value="Maximized" />
  40. <Setter Property="SnapsToDevicePixels" Value="True" />
  41. <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
  42. <Setter Property="ResizeMode" Value="CanMinimize" />
  43. </Style>
  44. <!-- 登录界面图片 -->
  45. <ImageSource x:Key="LoginLogo">pack://siteoforigin:,,,./Config\ExchangeLogo.png</ImageSource>
  46. <ImageSource x:Key="Login_Close">../../Images/login_close.png</ImageSource>
  47. <ImageSource x:Key="Login_Close_Select">../../Images/login_close_select.png</ImageSource>
  48. <ImageSource x:Key="Login_Key">../../Images/login_key.png</ImageSource>
  49. <ImageSource x:Key="Login_Radio">../../Images/login_radio.png</ImageSource>
  50. <ImageSource x:Key="Login_Radio_Select">../../Images/login_radio_select.png</ImageSource>
  51. <ImageSource x:Key="KeyboardImageSource">../../Images/Keyboard.png</ImageSource>
  52. <ImageSource x:Key="QuestionImageSource">../../Images/Question.png</ImageSource>
  53. <ImageSource x:Key="WindowIconImageSource">pack://siteoforigin:,,,./Config\ExchangeIcon.ico</ImageSource>
  54. <ImageSource x:Key="Listing_Cancal">../../Images/listing/Listing_Cancal.png</ImageSource>
  55. <ImageSource x:Key="Listing_Close">../../Images/listing/Listing_Close.png</ImageSource>
  56. <ImageSource x:Key="Listing_Auction">../../Images/listing/Listing_Auction.png</ImageSource>
  57. <ImageSource x:Key="Listing_AlterPrice">../../Images/listing/Listing_AlterPrice.png</ImageSource>
  58. <ImageSource x:Key="Listing_Query">../../Images/listing/Listing_Query.png</ImageSource>
  59. <ImageSource x:Key="Listing_Message">../../Images/listing/Listing_Message.png</ImageSource>
  60. <ImageSource x:Key="InGuidFirstStep">../../Images/InGuidFirstStep.png</ImageSource>
  61. <ImageSource x:Key="InGuidSecondStep">../../Images/InGuidSecondStep.png</ImageSource>
  62. <ImageSource x:Key="AccounImage">../../Images/AccounImage.png</ImageSource>
  63. <ImageSource x:Key="GoodsPicImageSource">../../Images/GoodsDefaultpic.png</ImageSource>
  64. <ImageSource x:Key="StatusbarConnected">../../Images/CoolBlack/statusbar_connected.png</ImageSource>
  65. <ImageSource x:Key="StatusbarDisconnected">../../Images/CoolBlack/statusbar_disconnected.png</ImageSource>
  66. <ImageSource x:Key="LockScreenImage">../../Images/LockScreen.png</ImageSource>
  67. <ImageBrush x:Key="LockScreenBrush" ImageSource="{DynamicResource LockScreenImage}" />
  68. <ImageSource x:Key="AccoutRefresh">../../Images/CoolBlack/accoutRefresh.png</ImageSource>
  69. <ImageSource x:Key="DialogCloseImg">../../Images/CoolBlack/prompt_close.png</ImageSource>
  70. <ImageSource x:Key="DialogCloseImg_P">../../Images/CoolBlack/prompt_close_d.png</ImageSource>
  71. <!-- 锁屏界面 -->
  72. <ImageSource x:Key="LockScreenBGIMG">../../Images/bj.png</ImageSource>
  73. <ImageSource x:Key="LogoIcon">../../Images/logo.png</ImageSource>
  74. <ImageSource x:Key="LogoutButtonIcon">../../Images/logout.png</ImageSource>
  75. <ImageSource x:Key="AccountIcon">../../Images/1_03.png</ImageSource>
  76. <ImageSource x:Key="GoodsLock">../../Images/GoodsLock.png</ImageSource>
  77. <ImageSource x:Key="GoodsUnLock">../../Images/GoodsUnLock.png</ImageSource>
  78. <Style x:Key="LockScreenImageStyle" TargetType="{x:Type button:ImageButton}">
  79. <Setter Property="NormalImageSource" Value="{DynamicResource LockScreenImage}" />
  80. <Setter Property="HoverImageSource" Value="{DynamicResource LockScreenImage}" />
  81. <Setter Property="PressedImageSource" Value="{DynamicResource LockScreenImage}" />
  82. <Setter Property="DisabledImageSource" Value="{DynamicResource LockScreenImage}" />
  83. </Style>
  84. <Style x:Key="WindowTradeSetStyle" TargetType="{x:Type button:ImageButton}">
  85. <Setter Property="NormalImageSource" Value="{DynamicResource KeyboardImageSource}" />
  86. <Setter Property="HoverImageSource" Value="{DynamicResource KeyboardImageSource}" />
  87. <Setter Property="PressedImageSource" Value="{DynamicResource KeyboardImageSource}" />
  88. <Setter Property="DisabledImageSource" Value="{DynamicResource KeyboardImageSource}" />
  89. <Setter Property="ToolTip" Value="{x:Static resource:Client_Resource.TradeParamerSet_Title}" />
  90. </Style>
  91. <Style x:Key="WindowMinImageStyle" TargetType="{x:Type button:ImageButton}">
  92. <Setter Property="NormalImageSource" Value="{DynamicResource WindowMinImageSource}" />
  93. <Setter Property="HoverImageSource" Value="{DynamicResource WindowMinImageSourcePressed}" />
  94. <Setter Property="PressedImageSource" Value="{DynamicResource WindowMinImageSourcePressed}" />
  95. <Setter Property="DisabledImageSource" Value="{DynamicResource WindowMinImageSource}" />
  96. <Setter Property="ToolTip" Value="{x:Static resource:Client_Resource.Themes_Min}" />
  97. </Style>
  98. <Style x:Key="WindowMaxImageStyle" TargetType="{x:Type button:ImageButton}">
  99. <Setter Property="NormalImageSource" Value="{DynamicResource WindowMaxImageSource}" />
  100. <Setter Property="HoverImageSource" Value="{DynamicResource WindowMaxImageSourcePressed}" />
  101. <Setter Property="PressedImageSource" Value="{DynamicResource WindowMaxImageSourcePressed}" />
  102. <Setter Property="DisabledImageSource" Value="{DynamicResource WindowMaxImageSource}" />
  103. <Setter Property="ToolTip" Value="{x:Static resource:Client_Resource.UI2014_RestoreDown}" />
  104. </Style>
  105. <Style x:Key="WindowMaxImageStyle1" TargetType="{x:Type button:ImageButton}">
  106. <Setter Property="NormalImageSource" Value="{DynamicResource WindowMaxImageSource1}" />
  107. <Setter Property="HoverImageSource" Value="{DynamicResource WindowMaxImageSourcePressed1}" />
  108. <Setter Property="PressedImageSource" Value="{DynamicResource WindowMaxImageSourcePressed1}" />
  109. <Setter Property="DisabledImageSource" Value="{DynamicResource WindowMaxImageSource1}" />
  110. <Setter Property="ToolTip" Value="{x:Static resource:Client_Resource.UI2014_Maximum}" />
  111. </Style>
  112. <Style x:Key="WindowCloseImageStyle" TargetType="{x:Type button:ImageButton}">
  113. <Setter Property="NormalImageSource" Value="{DynamicResource WindowCloseImageSource}" />
  114. <Setter Property="HoverImageSource" Value="{DynamicResource WindowCloseImageSourcePressed}" />
  115. <Setter Property="PressedImageSource" Value="{DynamicResource WindowCloseImageSourcePressed}" />
  116. <Setter Property="DisabledImageSource" Value="{DynamicResource WindowCloseImageSource}" />
  117. <Setter Property="ToolTip" Value="{x:Static resource:Client_Resource.Themes_ShutWindow}" />
  118. </Style>
  119. <Style x:Key="ThinSeparatorStyle" TargetType="{x:Type Separator}">
  120. <Setter Property="MinHeight" Value="0" />
  121. <Setter Property="MinWidth" Value="0" />
  122. <Setter Property="Margin" Value="0" />
  123. <Setter Property="Height" Value="1" />
  124. <Setter Property="Focusable" Value="false" />
  125. <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
  126. <Setter Property="BorderThickness" Value="1" />
  127. <Setter Property="Template">
  128. <Setter.Value>
  129. <ControlTemplate TargetType="{x:Type Separator}">
  130. <Themes:ClassicBorderDecorator Width="{TemplateBinding Width}"
  131. Height="{TemplateBinding Height}"
  132. BorderBrush="{TemplateBinding BorderBrush}"
  133. BorderStyle="HorizontalLine"
  134. BorderThickness="{TemplateBinding BorderThickness}" />
  135. </ControlTemplate>
  136. </Setter.Value>
  137. </Setter>
  138. </Style>
  139. <Style x:Key="ToolbarImageButtonStyle" TargetType="{x:Type button:ImageButton}">
  140. <Setter Property="HorizontalAlignment" Value="Center" />
  141. <Setter Property="VerticalAlignment" Value="Center" />
  142. <Setter Property="Background" Value="{DynamicResource MuchinfoBrush2}" />
  143. <Setter Property="BorderVisibility" Value="Visible" />
  144. <Setter Property="ImageWidth" Value="24" />
  145. <Setter Property="ImageHeight" Value="24" />
  146. <Setter Property="Width" Value="33" />
  147. <Setter Property="Height" Value="33" />
  148. <Setter Property="BorderCornerRadius" Value="2" />
  149. <Setter Property="Margin" Value="1" />
  150. <Style.Triggers>
  151. <Trigger Property="IsMouseOver" Value="True">
  152. <Setter Property="Background" Value="{DynamicResource MuchinfoBrush45}" />
  153. <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush46}" />
  154. <Setter Property="BorderThickness" Value="1" />
  155. </Trigger>
  156. <Trigger Property="IsChecked" Value="True">
  157. <Setter Property="Background" Value="{DynamicResource MuchinfoBrush7}" />
  158. </Trigger>
  159. </Style.Triggers>
  160. </Style>
  161. <Style x:Key="SimpleContextMenu" TargetType="{x:Type ContextMenu}">
  162. <Setter Property="Background" Value="Black" />
  163. <Setter Property="BorderBrush" Value="White" />
  164. <Setter Property="BorderThickness" Value="1" />
  165. </Style>
  166. <!-- Simple MenuItem - 该模板使用触发器来提供四种不同的菜单项排列方式,这些排列方式是通过 Role 属性设置的 -->
  167. <Style x:Key="SimpleMenuItem" TargetType="{x:Type MenuItem}">
  168. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  169. <Setter Property="VerticalContentAlignment" Value="Center" />
  170. <Setter Property="Background" Value="Transparent" />
  171. <Setter Property="Foreground" Value="White" />
  172. <Setter Property="Template">
  173. <Setter.Value>
  174. <ControlTemplate TargetType="{x:Type MenuItem}">
  175. <Grid SnapsToDevicePixels="true">
  176. <Rectangle x:Name="Bg"
  177. Fill="{TemplateBinding Background}"
  178. RadiusX="2"
  179. RadiusY="2"
  180. Stroke="{TemplateBinding BorderBrush}"
  181. StrokeThickness="1" />
  182. <Rectangle x:Name="InnerBorder"
  183. Margin="1"
  184. RadiusX="2"
  185. RadiusY="2" />
  186. <Grid>
  187. <Grid.ColumnDefinitions>
  188. <ColumnDefinition Width="Auto"
  189. MinWidth="24"
  190. SharedSizeGroup="MenuItemIconColumnGroup" />
  191. <ColumnDefinition Width="4" />
  192. <ColumnDefinition Width="*" />
  193. <ColumnDefinition Width="37" />
  194. <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
  195. <ColumnDefinition Width="17" />
  196. </Grid.ColumnDefinitions>
  197. <ContentPresenter x:Name="Icon"
  198. Margin="1"
  199. VerticalAlignment="Center"
  200. ContentSource="Icon"
  201. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  202. <Border x:Name="GlyphPanel"
  203. Width="22"
  204. Height="22"
  205. Margin="1"
  206. Background="#AB0b93d5"
  207. BorderBrush="#FF003147"
  208. BorderThickness="1"
  209. CornerRadius="3"
  210. Visibility="Hidden">
  211. <Path x:Name="Glyph"
  212. Width="9"
  213. Height="11"
  214. Data="{DynamicResource Checkmark}"
  215. Fill="#0C12A1"
  216. FlowDirection="LeftToRight" />
  217. </Border>
  218. <ContentPresenter Grid.Column="2"
  219. Margin="{TemplateBinding Padding}"
  220. VerticalAlignment="Center"
  221. ContentSource="Header"
  222. RecognizesAccessKey="True"
  223. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  224. <TextBlock Grid.Column="4"
  225. Margin="{TemplateBinding Padding}"
  226. Text="{TemplateBinding InputGestureText}" />
  227. </Grid>
  228. </Grid>
  229. <ControlTemplate.Triggers>
  230. <Trigger Property="Icon" Value="{x:Null}">
  231. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  232. </Trigger>
  233. <Trigger Property="IsChecked" Value="true">
  234. <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
  235. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  236. </Trigger>
  237. <Trigger Property="IsHighlighted" Value="true">
  238. <Setter TargetName="Bg" Property="Fill" Value="{DynamicResource MenuItemSelectionFill}" />
  239. <Setter TargetName="Bg" Property="Stroke" Value="#AB0b93d5" />
  240. <Setter TargetName="InnerBorder" Property="Stroke" Value="#FF003147" />
  241. </Trigger>
  242. <Trigger Property="IsEnabled" Value="false">
  243. <Setter Property="Foreground" Value="#FF9A9A9A" />
  244. <Setter TargetName="GlyphPanel" Property="Background" Value="#EEE9E9" />
  245. <Setter TargetName="GlyphPanel" Property="BorderBrush" Value="#DBD6D6" />
  246. <Setter TargetName="Glyph" Property="Fill" Value="#848589" />
  247. </Trigger>
  248. </ControlTemplate.Triggers>
  249. </ControlTemplate>
  250. </Setter.Value>
  251. </Setter>
  252. </Style>
  253. <Style x:Key="DialogWindowStyle" TargetType="{x:Type Window}">
  254. <Setter Property="AllowsTransparency" Value="True" />
  255. <Setter Property="Background" Value="Transparent" />
  256. <Setter Property="FontFamily" Value="Simsun, Microsoft YaHei" />
  257. <Setter Property="Foreground" Value="{DynamicResource DialogWindowContnetForeground}" />
  258. <Setter Property="FontSize" Value="{DynamicResource MuchinfoFontSize_XS}" />
  259. <Setter Property="ResizeMode" Value="NoResize" />
  260. <Setter Property="WindowStyle" Value="None" />
  261. <Setter Property="SnapsToDevicePixels" Value="True" />
  262. <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
  263. <Setter Property="Width" Value="565" />
  264. <Setter Property="Height" Value="529" />
  265. <Setter Property="ShowInTaskbar" Value="False" />
  266. <Setter Property="Template">
  267. <Setter.Value>
  268. <ControlTemplate TargetType="{x:Type Window}">
  269. <Grid Margin="10">
  270. <Rectangle RadiusX="2" RadiusY="2">
  271. <Rectangle.Effect>
  272. <DropShadowEffect BlurRadius="10" ShadowDepth="0" />
  273. </Rectangle.Effect>
  274. </Rectangle>
  275. <Border Background="{DynamicResource DialogWindowBackground}"
  276. BorderBrush="{TemplateBinding BorderBrush}"
  277. BorderThickness="{TemplateBinding BorderThickness}"
  278. CornerRadius="2"
  279. Padding="{TemplateBinding Margin}"
  280. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
  281. <Grid>
  282. <Grid.RowDefinitions>
  283. <RowDefinition Height="47" />
  284. <RowDefinition Height="1" />
  285. <RowDefinition Height="1" />
  286. <RowDefinition Height="*" />
  287. </Grid.RowDefinitions>
  288. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  289. <Border x:Name="brdTitle"
  290. Margin="30,5,30,0"
  291. HorizontalAlignment="Stretch"
  292. VerticalAlignment="Stretch"
  293. Background="Transparent">
  294. <TextBlock HorizontalAlignment="Center"
  295. VerticalAlignment="Center"
  296. FontSize="{DynamicResource MuchinfoFontSize_M}"
  297. FontWeight="Bold"
  298. Foreground="{DynamicResource DialogWindowTitleForeground}"
  299. Text="{TemplateBinding Title}"
  300. TextTrimming="CharacterEllipsis"
  301. ToolTip="{TemplateBinding Title}" />
  302. <i:Interaction.Triggers>
  303. <i:EventTrigger EventName="MouseMove">
  304. <i:InvokeCommandAction Command="{x:Static windows:DialogWindowCommands.DragMove}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
  305. </i:EventTrigger>
  306. </i:Interaction.Triggers>
  307. </Border>
  308. <Button x:Name="btnClose"
  309. Width="20"
  310. Margin="10,2"
  311. HorizontalAlignment="Right"
  312. Command="{x:Static windows:DialogWindowCommands.Close}"
  313. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,
  314. AncestorType={x:Type Window}}}"
  315. IsCancel="True"
  316. Padding="2"
  317. Style="{DynamicResource DialogCloseButtonStyle}" />
  318. </Grid>
  319. <Separator Grid.Row="1"
  320. Margin="20,0"
  321. VerticalAlignment="Bottom"
  322. Panel.ZIndex="10"
  323. BorderBrush="{DynamicResource DialogWindowSeparatorTop}"
  324. Style="{DynamicResource ThinSeparatorStyle}" />
  325. <Separator Grid.Row="2"
  326. Margin="20,0"
  327. VerticalAlignment="Bottom"
  328. Panel.ZIndex="10"
  329. BorderBrush="{DynamicResource DialogWindowSeparatorBottom}"
  330. Style="{DynamicResource ThinSeparatorStyle}" />
  331. <ContentPresenter Grid.Row="3" />
  332. </Grid>
  333. </Border>
  334. </Grid>
  335. </ControlTemplate>
  336. </Setter.Value>
  337. </Setter>
  338. </Style>
  339. <!-- 交易参数设置(带自动止盈止损设置) -->
  340. <Style x:Key="TradeDialogWindowStyle" TargetType="{x:Type Window}">
  341. <Setter Property="AllowsTransparency" Value="True" />
  342. <Setter Property="Background" Value="Transparent" />
  343. <Setter Property="FontFamily" Value="Simsun, Microsoft YaHei" />
  344. <Setter Property="Foreground" Value="{DynamicResource DialogWindowContnetForeground}" />
  345. <Setter Property="FontSize" Value="{DynamicResource MuchinfoFontSize_XS}" />
  346. <Setter Property="ResizeMode" Value="NoResize" />
  347. <Setter Property="WindowStyle" Value="None" />
  348. <Setter Property="SnapsToDevicePixels" Value="True" />
  349. <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
  350. <Setter Property="Width" Value="565" />
  351. <Setter Property="Height" Value="529" />
  352. <Setter Property="ShowInTaskbar" Value="False" />
  353. <Setter Property="Template">
  354. <Setter.Value>
  355. <ControlTemplate TargetType="{x:Type Window}">
  356. <Grid Margin="10">
  357. <Rectangle RadiusX="2" RadiusY="2">
  358. <Rectangle.Effect>
  359. <DropShadowEffect BlurRadius="10" ShadowDepth="0" />
  360. </Rectangle.Effect>
  361. </Rectangle>
  362. <Border Background="{DynamicResource DialogWindowBackground}"
  363. BorderBrush="{TemplateBinding BorderBrush}"
  364. BorderThickness="{TemplateBinding BorderThickness}"
  365. CornerRadius="2"
  366. Padding="{TemplateBinding Margin}"
  367. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
  368. <Grid>
  369. <Grid.ColumnDefinitions>
  370. <ColumnDefinition Width="1*" />
  371. <ColumnDefinition Width="Auto" />
  372. </Grid.ColumnDefinitions>
  373. <Grid.RowDefinitions>
  374. <RowDefinition Height="47" />
  375. <RowDefinition Height="1" />
  376. <RowDefinition Height="1" />
  377. <RowDefinition Height="*" />
  378. </Grid.RowDefinitions>
  379. <Grid Grid.Row="0"
  380. Grid.ColumnSpan="2"
  381. HorizontalAlignment="Stretch"
  382. VerticalAlignment="Stretch">
  383. <Grid>
  384. <Grid.ColumnDefinitions>
  385. <ColumnDefinition Width="1*" />
  386. <ColumnDefinition Width="Auto" />
  387. </Grid.ColumnDefinitions>
  388. </Grid>
  389. <Border x:Name="brdTitle"
  390. Margin="15,5,30,0"
  391. HorizontalAlignment="Stretch"
  392. VerticalAlignment="Bottom">
  393. <i:Interaction.Triggers>
  394. <i:EventTrigger EventName="MouseMove">
  395. <i:InvokeCommandAction Command="{x:Static windows:DialogWindowCommands.DragMove}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
  396. </i:EventTrigger>
  397. </i:Interaction.Triggers>
  398. <TabControl x:Name="TradeTabControl"
  399. Margin="0,10,0,0"
  400. VerticalAlignment="Center"
  401. Background="Transparent"
  402. BorderBrush="Transparent">
  403. <TabItem Header="{x:Static resource:Client_Resource.TradeParamerSet_Title}" Style="{DynamicResource TabItemCardStyle}" />
  404. <!--<TabItem Header="{x:Static resource:Client_Resource.Auto_Entrust_Profit_Loss}" Style="{DynamicResource TabItemCardStyle}" />-->
  405. </TabControl>
  406. </Border>
  407. <Button x:Name="btnClose"
  408. Width="20"
  409. Margin="10,2"
  410. HorizontalAlignment="Right"
  411. Command="{x:Static windows:DialogWindowCommands.Close}"
  412. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,
  413. AncestorType={x:Type Window}}}"
  414. IsCancel="True"
  415. Padding="2"
  416. Style="{DynamicResource DialogCloseButtonStyle}" />
  417. </Grid>
  418. <Separator Grid.Row="1"
  419. Grid.ColumnSpan="2"
  420. Margin="20,0"
  421. VerticalAlignment="Bottom"
  422. Panel.ZIndex="10"
  423. BorderBrush="{DynamicResource DialogWindowSeparatorTop}"
  424. Style="{DynamicResource ThinSeparatorStyle}" />
  425. <Separator Grid.Row="2"
  426. Grid.ColumnSpan="2"
  427. Margin="20,0"
  428. VerticalAlignment="Bottom"
  429. Panel.ZIndex="10"
  430. BorderBrush="{DynamicResource DialogWindowSeparatorBottom}"
  431. Style="{DynamicResource ThinSeparatorStyle}" />
  432. <ContentPresenter Grid.Row="3" />
  433. </Grid>
  434. </Border>
  435. </Grid>
  436. </ControlTemplate>
  437. </Setter.Value>
  438. </Setter>
  439. </Style>
  440. <Style x:Key="TabItemCardStyle" TargetType="{x:Type TabItem}">
  441. <Setter Property="Header" Value="{Binding Name}" />
  442. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  443. <Setter Property="Foreground" Value="#818181" />
  444. <Setter Property="FontSize" Value="16" />
  445. <Setter Property="Padding" Value="5,3,5,3" />
  446. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  447. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  448. <Setter Property="SnapsToDevicePixels" Value="True" />
  449. <Setter Property="UseLayoutRounding" Value="True" />
  450. <Setter Property="BorderThickness" Value="0,0,0,2" />
  451. <Setter Property="Background" Value="#FFFFFF" />
  452. <Setter Property="BorderBrush" Value="Transparent" />
  453. <Setter Property="Template">
  454. <Setter.Value>
  455. <ControlTemplate TargetType="{x:Type TabItem}">
  456. <Border x:Name="border"
  457. Margin="{TemplateBinding Margin}"
  458. Background="{TemplateBinding Background}"
  459. BorderBrush="{TemplateBinding BorderBrush}"
  460. BorderThickness="{TemplateBinding BorderThickness}"
  461. CornerRadius="3,3,0,0"
  462. Padding="{TemplateBinding Padding}"
  463. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  464. UseLayoutRounding="{TemplateBinding UseLayoutRounding}">
  465. <ContentPresenter x:Name="contentPresenter"
  466. Margin="{TemplateBinding Padding}"
  467. HorizontalAlignment="{Binding HorizontalContentAlignment,
  468. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  469. VerticalAlignment="{Binding VerticalContentAlignment,
  470. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  471. ContentSource="Header"
  472. Focusable="False"
  473. RecognizesAccessKey="True"
  474. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  475. </Border>
  476. <ControlTemplate.Triggers>
  477. <MultiDataTrigger>
  478. <MultiDataTrigger.Conditions>
  479. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
  480. <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top" />
  481. </MultiDataTrigger.Conditions>
  482. <Setter TargetName="border" Property="Cursor" Value="Hand" />
  483. <Setter Property="Background" Value="#FFFFFF" />
  484. <Setter Property="BorderBrush" Value="#007ACC" />
  485. </MultiDataTrigger>
  486. <MultiDataTrigger>
  487. <MultiDataTrigger.Conditions>
  488. <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
  489. <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top" />
  490. </MultiDataTrigger.Conditions>
  491. <Setter Property="Panel.ZIndex" Value="1" />
  492. <Setter Property="BorderBrush" Value="#989898" />
  493. <Setter Property="Background" Value="#989898" />
  494. <Setter Property="BorderThickness" Value="1,1,1,0" />
  495. <Setter Property="Foreground" Value="#FFFFFF" />
  496. <Setter Property="FontSize" Value="12" />
  497. <Setter Property="Margin" Value="0,0,2,0" />
  498. </MultiDataTrigger>
  499. <MultiDataTrigger>
  500. <MultiDataTrigger.Conditions>
  501. <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
  502. <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top" />
  503. </MultiDataTrigger.Conditions>
  504. <Setter Property="Panel.ZIndex" Value="1" />
  505. <Setter Property="BorderBrush" Value="{DynamicResource ButtonBackground}" />
  506. <Setter Property="BorderThickness" Value="1,1,1,0" />
  507. <Setter Property="Background" Value="{DynamicResource ButtonBackground}" />
  508. <Setter Property="FontSize" Value="12" />
  509. <Setter Property="Foreground" Value="#FFFFFF" />
  510. <Setter Property="Margin" Value="0,0,2,0" />
  511. </MultiDataTrigger>
  512. <MultiDataTrigger>
  513. <MultiDataTrigger.Conditions>
  514. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
  515. <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top" />
  516. </MultiDataTrigger.Conditions>
  517. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.56" />
  518. </MultiDataTrigger>
  519. </ControlTemplate.Triggers>
  520. </ControlTemplate>
  521. </Setter.Value>
  522. </Setter>
  523. </Style>
  524. <!-- 登录密码样式 -->
  525. <LinearGradientBrush x:Key="TextBoxBorder" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,20">
  526. <GradientStop Offset="0.05" Color="#ABADB3" />
  527. <GradientStop Offset="0.07" Color="#E2E3EA" />
  528. <GradientStop Offset="1" Color="#E3E9EF" />
  529. </LinearGradientBrush>
  530. <LinearGradientBrush x:Key="TextBox_MouseOver" StartPoint="0,0" EndPoint="0,1">
  531. <GradientStop Offset="0.05" Color="#5794BF" />
  532. <GradientStop Offset="0.07" Color="#B7D5EA" />
  533. <GradientStop Offset="1" Color="#C7E2F1" />
  534. </LinearGradientBrush>
  535. <LinearGradientBrush x:Key="TextBox_Focused" StartPoint="0,0" EndPoint="0,1">
  536. <GradientStop Offset="0.05" Color="#3D7BAD" />
  537. <GradientStop Offset="0.07" Color="#A4C9E3" />
  538. <GradientStop Offset="1" Color="#B7D9ED" />
  539. </LinearGradientBrush>
  540. <Style x:Key="LoginPasswordBoxStyle" TargetType="{x:Type PasswordBox}">
  541. <Style.Resources>
  542. <VisualBrush x:Key="TipBrush"
  543. AlignmentX="Left"
  544. Stretch="None"
  545. TileMode="None">
  546. <VisualBrush.Visual>
  547. <StackPanel Orientation="Horizontal">
  548. <TextBlock FontSize="10"
  549. Foreground="Transparent"
  550. Text="1111111" />
  551. <TextBlock FontSize="13"
  552. Foreground="#FFA1A6AA"
  553. Text="{x:Static resource:Client_Resource.Tip_PasswordInput}" />
  554. </StackPanel>
  555. </VisualBrush.Visual>
  556. </VisualBrush>
  557. </Style.Resources>
  558. <Setter Property="PasswordChar" Value="●" />
  559. <Setter Property="Foreground" Value="#FF444444" />
  560. <Setter Property="FontSize" Value="13" />
  561. <Setter Property="BorderThickness" Value="1" />
  562. <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}" />
  563. <Setter Property="Template">
  564. <Setter.Value>
  565. <ControlTemplate TargetType="{x:Type PasswordBox}">
  566. <Grid Height="{TemplateBinding Height}"
  567. HorizontalAlignment="Stretch"
  568. VerticalAlignment="Stretch">
  569. <Border x:Name="Border"
  570. Height="{TemplateBinding Height}"
  571. Margin="0,0,8,0"
  572. Panel.ZIndex="1"
  573. Background="{TemplateBinding Background}"
  574. BorderBrush="{TemplateBinding BorderBrush}"
  575. BorderThickness="{TemplateBinding BorderThickness}"
  576. CornerRadius="1" />
  577. <Border x:Name="MouseOverVisual"
  578. Height="{TemplateBinding Height}"
  579. Margin="0,0,8,0"
  580. Panel.ZIndex="1"
  581. BorderBrush="{StaticResource TextBox_MouseOver}"
  582. BorderThickness="{TemplateBinding BorderThickness}"
  583. CornerRadius="1"
  584. Opacity="0" />
  585. <Border x:Name="FocusVisual"
  586. Height="{TemplateBinding Height}"
  587. Margin="0,0,8,0"
  588. Panel.ZIndex="1"
  589. BorderBrush="{StaticResource TextBox_Focused}"
  590. BorderThickness="{TemplateBinding BorderThickness}"
  591. CornerRadius="1"
  592. Opacity="0" />
  593. <Image Width="14"
  594. Height="14"
  595. Margin="12,0,0,0"
  596. HorizontalAlignment="Left"
  597. VerticalAlignment="Center"
  598. Panel.ZIndex="1"
  599. Source="{DynamicResource PasswordBoxIcon}" />
  600. <!--
  601. <Rectangle Width="12"
  602. Height="20"
  603. Margin="12,0,0,0"
  604. HorizontalAlignment="Left"
  605. VerticalAlignment="Center"
  606. Panel.ZIndex="1"
  607. Fill="{StaticResource PasswordBoxIcon}" />
  608. -->
  609. <ScrollViewer x:Name="PART_ContentHost"
  610. Margin="32,0,8,0"
  611. HorizontalAlignment="Stretch"
  612. VerticalAlignment="Center"
  613. VerticalContentAlignment="Center"
  614. Panel.ZIndex="2"
  615. Background="{x:Null}"
  616. FontSize="{TemplateBinding FontSize}"
  617. Foreground="{TemplateBinding Foreground}"
  618. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  619. </Grid>
  620. <ControlTemplate.Triggers>
  621. <Trigger Property="IsMouseOver" Value="True">
  622. <Setter TargetName="MouseOverVisual" Property="Opacity" Value="1" />
  623. </Trigger>
  624. <Trigger Property="IsFocused" Value="True">
  625. <Setter TargetName="FocusVisual" Property="Opacity" Value="1" />
  626. </Trigger>
  627. <Trigger Property="IsEnabled" Value="False">
  628. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextBox_DisabledBorder}" />
  629. <Setter TargetName="Border" Property="Background" Value="{StaticResource TextBox_DisabledBackground}" />
  630. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  631. </Trigger>
  632. <DataTrigger Binding="{Binding Password, UpdateSourceTrigger=PropertyChanged}" Value="{x:Null}">
  633. <Setter Property="Background" Value="{StaticResource TipBrush}" />
  634. </DataTrigger>
  635. <DataTrigger Binding="{Binding Password, UpdateSourceTrigger=PropertyChanged}" Value="">
  636. <Setter Property="Background" Value="{StaticResource TipBrush}" />
  637. </DataTrigger>
  638. </ControlTemplate.Triggers>
  639. </ControlTemplate>
  640. </Setter.Value>
  641. </Setter>
  642. </Style>
  643. <Style TargetType="{x:Type xctk:BusyIndicator}">
  644. <Setter Property="BusyContent" Value="Please wait..." />
  645. <Setter Property="IsTabStop" Value="False" />
  646. <Setter Property="Focusable" Value="False" />
  647. <Setter Property="OverlayStyle">
  648. <Setter.Value>
  649. <Style TargetType="{x:Type Rectangle}">
  650. <Setter Property="Opacity" Value="0" />
  651. </Style>
  652. </Setter.Value>
  653. </Setter>
  654. <Setter Property="ProgressBarStyle">
  655. <Setter.Value>
  656. <Style TargetType="{x:Type ProgressBar}">
  657. <Setter Property="IsIndeterminate" Value="True" />
  658. <Setter Property="Height" Value="15" />
  659. <Setter Property="Margin" Value="8,0,8,8" />
  660. </Style>
  661. </Setter.Value>
  662. </Setter>
  663. <Setter Property="DisplayAfter" Value="0:0:0.1" />
  664. <Setter Property="HorizontalAlignment" Value="Stretch" />
  665. <Setter Property="VerticalAlignment" Value="Stretch" />
  666. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  667. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  668. <Setter Property="Template">
  669. <Setter.Value>
  670. <ControlTemplate TargetType="{x:Type xctk:BusyIndicator}">
  671. <Grid>
  672. <VisualStateManager.VisualStateGroups>
  673. <VisualStateGroup x:Name="VisibilityStates">
  674. <VisualState x:Name="Hidden">
  675. <Storyboard>
  676. <ObjectAnimationUsingKeyFrames BeginTime="0"
  677. Duration="0:0:0.001"
  678. Storyboard.TargetName="busycontent"
  679. Storyboard.TargetProperty="(UIElement.Visibility)">
  680. <DiscreteObjectKeyFrame KeyTime="0">
  681. <DiscreteObjectKeyFrame.Value>
  682. <Visibility>Collapsed</Visibility>
  683. </DiscreteObjectKeyFrame.Value>
  684. </DiscreteObjectKeyFrame>
  685. </ObjectAnimationUsingKeyFrames>
  686. <ObjectAnimationUsingKeyFrames BeginTime="0"
  687. Duration="0:0:0.001"
  688. Storyboard.TargetName="overlay"
  689. Storyboard.TargetProperty="(UIElement.Visibility)">
  690. <DiscreteObjectKeyFrame KeyTime="0">
  691. <DiscreteObjectKeyFrame.Value>
  692. <Visibility>Collapsed</Visibility>
  693. </DiscreteObjectKeyFrame.Value>
  694. </DiscreteObjectKeyFrame>
  695. </ObjectAnimationUsingKeyFrames>
  696. </Storyboard>
  697. </VisualState>
  698. <VisualState x:Name="Visible">
  699. <Storyboard>
  700. <ObjectAnimationUsingKeyFrames BeginTime="0"
  701. Duration="0:0:0.001"
  702. Storyboard.TargetName="busycontent"
  703. Storyboard.TargetProperty="(UIElement.Visibility)">
  704. <DiscreteObjectKeyFrame KeyTime="0">
  705. <DiscreteObjectKeyFrame.Value>
  706. <Visibility>Visible</Visibility>
  707. </DiscreteObjectKeyFrame.Value>
  708. </DiscreteObjectKeyFrame>
  709. </ObjectAnimationUsingKeyFrames>
  710. <ObjectAnimationUsingKeyFrames BeginTime="0"
  711. Duration="0:0:0.001"
  712. Storyboard.TargetName="overlay"
  713. Storyboard.TargetProperty="(UIElement.Visibility)">
  714. <DiscreteObjectKeyFrame KeyTime="0">
  715. <DiscreteObjectKeyFrame.Value>
  716. <Visibility>Visible</Visibility>
  717. </DiscreteObjectKeyFrame.Value>
  718. </DiscreteObjectKeyFrame>
  719. </ObjectAnimationUsingKeyFrames>
  720. </Storyboard>
  721. </VisualState>
  722. </VisualStateGroup>
  723. <VisualStateGroup x:Name="BusyStatusStates">
  724. <VisualState x:Name="Idle">
  725. <Storyboard>
  726. <ObjectAnimationUsingKeyFrames BeginTime="0"
  727. Duration="0:0:0.001"
  728. Storyboard.TargetName="content"
  729. Storyboard.TargetProperty="(UIElement.IsEnabled)">
  730. <DiscreteObjectKeyFrame KeyTime="0">
  731. <DiscreteObjectKeyFrame.Value>
  732. <system:Boolean>True</system:Boolean>
  733. </DiscreteObjectKeyFrame.Value>
  734. </DiscreteObjectKeyFrame>
  735. </ObjectAnimationUsingKeyFrames>
  736. </Storyboard>
  737. </VisualState>
  738. <VisualState x:Name="Busy">
  739. <Storyboard>
  740. <ObjectAnimationUsingKeyFrames BeginTime="0"
  741. Duration="0:0:0.001"
  742. Storyboard.TargetName="content"
  743. Storyboard.TargetProperty="(UIElement.IsEnabled)">
  744. <DiscreteObjectKeyFrame KeyTime="0">
  745. <DiscreteObjectKeyFrame.Value>
  746. <system:Boolean>False</system:Boolean>
  747. </DiscreteObjectKeyFrame.Value>
  748. </DiscreteObjectKeyFrame>
  749. </ObjectAnimationUsingKeyFrames>
  750. </Storyboard>
  751. </VisualState>
  752. </VisualStateGroup>
  753. </VisualStateManager.VisualStateGroups>
  754. <ContentControl x:Name="content"
  755. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  756. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  757. Content="{TemplateBinding Content}"
  758. ContentTemplate="{TemplateBinding ContentTemplate}"
  759. Focusable="False"
  760. IsTabStop="False" />
  761. <Rectangle x:Name="overlay" Style="{TemplateBinding OverlayStyle}" />
  762. <ContentPresenter x:Name="busycontent">
  763. <ContentPresenter.Content>
  764. <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
  765. <Border Background="White"
  766. BorderThickness="1"
  767. CornerRadius="2">
  768. <Border.BorderBrush>
  769. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  770. <GradientStop Offset="0" Color="#FFA3AEB9" />
  771. <GradientStop Offset="0.375" Color="#FF8399A9" />
  772. <GradientStop Offset="0.375" Color="#FF718597" />
  773. <GradientStop Offset="1" Color="#FF617584" />
  774. </LinearGradientBrush>
  775. </Border.BorderBrush>
  776. <Border Margin="1" CornerRadius="1.5">
  777. <Border.Background>
  778. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  779. <GradientStop Offset="0.02" Color="#FFF6F8F9" />
  780. <GradientStop Offset="0.996" Color="#FFB8B8B8" />
  781. </LinearGradientBrush>
  782. </Border.Background>
  783. <Grid MinWidth="150">
  784. <Grid.RowDefinitions>
  785. <RowDefinition />
  786. <RowDefinition Height="Auto" />
  787. </Grid.RowDefinitions>
  788. <ContentPresenter Margin="8"
  789. Content="{TemplateBinding BusyContent}"
  790. ContentTemplate="{TemplateBinding BusyContentTemplate}" />
  791. <ProgressBar Grid.Row="1" Style="{TemplateBinding ProgressBarStyle}" />
  792. </Grid>
  793. </Border>
  794. </Border>
  795. </Grid>
  796. </ContentPresenter.Content>
  797. </ContentPresenter>
  798. </Grid>
  799. </ControlTemplate>
  800. </Setter.Value>
  801. </Setter>
  802. </Style>
  803. </ResourceDictionary>