OrderContent.xaml 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339
  1. <UserControl x:Class="Muchinfo.MTPClient.Trade.Views.OrderContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:border="clr-namespace:Muchinfo.WPF.Controls.Border;assembly=Client.WPF.Controls"
  5. xmlns:controls="clr-namespace:Muchinfo.WPF.Controls;assembly=Client.WPF.Controls"
  6. xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:resources="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  11. xmlns:utilities="clr-namespace:Muchinfo.MTPClient.Trade.Utilities"
  12. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  13. xmlns:zoom="clr-namespace:Muchinfo.WPF.Controls.Zoom;assembly=Client.WPF.Controls"
  14. Background="Transparent"
  15. KeyUp="OrderContent_OnKeyUp"
  16. MouseDown="OrderContent_OnMouseDown"
  17. mc:Ignorable="d">
  18. <UserControl.Resources>
  19. <converters:BoolOpposedVisibility x:Key="BoolOpposedVisibility" />
  20. <converters:EnumBooleanConvert x:Key="EnumBooleanConvert" />
  21. <converters:EnumVisibilityConvert x:Key="EnumVisibilityConvert" />
  22. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  23. <Style TargetType="{x:Type TextBlock}">
  24. <Setter Property="HorizontalAlignment" Value="Right" />
  25. <Setter Property="VerticalAlignment" Value="Center" />
  26. <Setter Property="Foreground" Value="{DynamicResource TextBlockForeground}" />
  27. </Style>
  28. <Style TargetType="{x:Type RadioButton}">
  29. <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
  30. </Style>
  31. <DataTemplate x:Key="TriggerTypeDatatTemplate">
  32. <TextBlock>
  33. <Run Text="{Binding Description}" />
  34. </TextBlock>
  35. </DataTemplate>
  36. <DataTemplate x:Key="GoodsDatatTemplate">
  37. <TextBlock>
  38. <Run Text="{Binding Name}" />
  39. <Run Text=" " />
  40. <Run Text="{Binding GoodsCode}" />
  41. </TextBlock>
  42. </DataTemplate>
  43. <DataTemplate x:Key="UserFundsTemplate">
  44. <TextBlock>
  45. <Run Text="{Binding AccountId}" />
  46. </TextBlock>
  47. </DataTemplate>
  48. </UserControl.Resources>
  49. <!--
  50. 动态绑定,这是这不好说,这个界面没有收到绑定数据的时候,是没有Visibility的效果的,
  51. 所以每次进入界面的时候,都是乱的,什么界面都显示,只能是viewModel加载后,我才能知道要显示那些东西了。
  52. 这里暂时隐藏吧。 ***********************调试界面的时候,打开这个Collapsed,发布的时候,记得加上************************
  53. -->
  54. <Grid x:Name="OrderContentArea" Visibility="Collapsed">
  55. <Grid.RowDefinitions>
  56. <RowDefinition />
  57. <RowDefinition Height="Auto" />
  58. </Grid.RowDefinitions>
  59. <Grid>
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="Auto" />
  62. <RowDefinition Height="33" />
  63. <RowDefinition Height="Auto" />
  64. <RowDefinition Height="Auto" />
  65. <RowDefinition Height="Auto" />
  66. <RowDefinition Height="Auto" />
  67. <RowDefinition Height="Auto" />
  68. <RowDefinition Height="Auto" />
  69. <RowDefinition Height="Auto" />
  70. <RowDefinition Height="Auto" />
  71. <RowDefinition Height="Auto" />
  72. <RowDefinition Height="Auto" />
  73. <RowDefinition Height="Auto" />
  74. <RowDefinition Height="Auto" />
  75. <RowDefinition Height="*" />
  76. </Grid.RowDefinitions>
  77. <Grid.ColumnDefinitions>
  78. <ColumnDefinition Width="Auto" />
  79. <ColumnDefinition />
  80. <ColumnDefinition Width="Auto" />
  81. </Grid.ColumnDefinitions>
  82. <TextBlock Grid.Row="0"
  83. Text="{x:Static resources:Client_Resource.Trade_Xaml_Accout_Title}"
  84. Visibility="Collapsed" />
  85. <TextBlock Grid.Row="0"
  86. Grid.Column="1"
  87. Margin="20,0,0,0"
  88. HorizontalAlignment="Left"
  89. TextTrimming="CharacterEllipsis"
  90. TextWrapping="NoWrap"
  91. Visibility="Collapsed">
  92. <Run Text="{Binding CurrentFunAccount, Mode=OneWay}" />
  93. <Run Text=" " />
  94. <Run Text="{Binding CurrentFunAccountNameFormat, Mode=OneWay}" ToolTip="{Binding CurrentFunAccountName}" />
  95. </TextBlock>
  96. <TextBlock Grid.Row="1" Text="{x:Static resources:Client_Resource.Trade_Xaml_Goods_Title}" />
  97. <ComboBox x:Name="goodsComBoxBox"
  98. Grid.Row="1"
  99. Grid.Column="1"
  100. Width="200"
  101. Height="22"
  102. Margin="20,0,0,0"
  103. HorizontalAlignment="Left"
  104. VerticalAlignment="Center"
  105. IsEnabled="True"
  106. IsTextSearchCaseSensitive="True"
  107. IsTextSearchEnabled="True"
  108. ItemTemplate="{StaticResource GoodsDatatTemplate}"
  109. ItemsSource="{Binding GoodsList}"
  110. KeyUp="goodsComBoxBox_KeyUp"
  111. Padding="5"
  112. SelectedIndex="0"
  113. SelectedItem="{Binding CurrentGoods,
  114. Mode=TwoWay}"
  115. Style="{DynamicResource GoodsComboBoxStyle}"
  116. TabIndex="1" />
  117. <!--
  118. <Popup x:Name="GoodsPopup"
  119. Grid.Row="1"
  120. Grid.Column="1"
  121. Width="200"
  122. Height="200"
  123. PlacementTarget="{Binding ElementName=goodsComBoxBox}"
  124. StaysOpen="{Binding ElementName=goodsComBoxBox,
  125. Path=IsKeyboardFocused}">
  126. <Grid>
  127. <StackPanel>
  128. <ListBox x:Name="GoodsList"
  129. Background="Transparent"
  130. BorderThickness="0"
  131. ItemContainerStyle="{DynamicResource NoticeListBoxItemStyle}"
  132. ItemTemplate="{DynamicResource GoodsListItemViewTemplate}"
  133. ItemsSource="{Binding FilterQuoteGoodses}"
  134. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  135. SelectedItem="{Binding CurrentGoods}"
  136. SelectionMode="Single" />
  137. </StackPanel>
  138. </Grid>
  139. </Popup>
  140. -->
  141. <!-- Style="{DynamicResource SimpleComboBoxStyle}" -->
  142. <!-- 商品锁 -->
  143. <StackPanel Grid.Row="1"
  144. Grid.Column="2"
  145. MinWidth="50"
  146. Margin="10,0,0,0"
  147. HorizontalAlignment="Left"
  148. Background="Transparent"
  149. Orientation="Horizontal"
  150. Visibility="{Binding ShowGoodsLock,
  151. Converter={StaticResource BooleanToVisibilityConverter}}">
  152. <i:Interaction.Triggers>
  153. <i:EventTrigger EventName="MouseLeftButtonDown">
  154. <i:InvokeCommandAction Command="{Binding LockImageCommand}" />
  155. </i:EventTrigger>
  156. </i:Interaction.Triggers>
  157. <Image Width="25"
  158. Height="25"
  159. Margin="1,0,0,0"
  160. Source="{DynamicResource GoodsLock}"
  161. Visibility="{Binding LockType,
  162. Converter={StaticResource EnumVisibilityConvert},
  163. ConverterParameter=0}" />
  164. <Image Width="32"
  165. Height="25"
  166. Source="{DynamicResource GoodsUnLock}"
  167. Visibility="{Binding LockType,
  168. Converter={StaticResource EnumVisibilityConvert},
  169. ConverterParameter=1}" />
  170. </StackPanel>
  171. <!-- 资金账户 -->
  172. <TextBlock Grid.Row="2"
  173. Text="资金账户"
  174. Visibility="{Binding TradeViewModel.IsShowUserMultFundsList}" />
  175. <utilities:FocusComboBox x:Name="MoneyComBoxBox"
  176. Grid.Row="2"
  177. Grid.Column="2"
  178. Width="200"
  179. Margin="20,5,0,5"
  180. HorizontalAlignment="Left"
  181. VerticalAlignment="Center"
  182. ItemsSource="{Binding TradeViewModel.CurrentUserFundsList}"
  183. SelectedIndex="0"
  184. SelectedItem="{Binding TradeViewModel.CurrentSelectedFunds,
  185. Mode=TwoWay}"
  186. Style="{DynamicResource SimpleComboBoxStyle}"
  187. TabIndex="4"
  188. Visibility="{Binding TradeViewModel.IsShowUserMultFundsList}" />
  189. <StackPanel Grid.Row="3"
  190. Grid.Column="0"
  191. Grid.ColumnSpan="2"
  192. Margin="0"
  193. Orientation="Vertical">
  194. <!-- 方向 -->
  195. <StackPanel x:Name="direction"
  196. Margin="{Binding TradeViewModel.ShowMultUserFundsMargin}"
  197. Orientation="Horizontal">
  198. <TextBlock Grid.Row="3" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Direction}" />
  199. <StackPanel Grid.Row="3"
  200. Grid.Column="2"
  201. Height="33"
  202. VerticalAlignment="Center"
  203. Orientation="Horizontal">
  204. <RadioButton Margin="20,0,0,0"
  205. Content="{Binding TradeViewModel.BuyTitle}"
  206. IsChecked="{Binding TradeViewModel.Direction,
  207. ConverterParameter=0,
  208. Converter={StaticResource EnumBooleanConvert}}"
  209. IsEnabled="{Binding TradeViewModel.IsBuyEnable}"
  210. Style="{DynamicResource RadioButtonStyle}"
  211. TabIndex="2" />
  212. <RadioButton Margin="20,0,0,0"
  213. Content="{Binding TradeViewModel.SellTitle}"
  214. IsChecked="{Binding TradeViewModel.Direction,
  215. ConverterParameter=1,
  216. Converter={StaticResource EnumBooleanConvert}}"
  217. IsEnabled="{Binding TradeViewModel.IsSellEnable}"
  218. Style="{DynamicResource RadioButtonStyle}"
  219. TabIndex="3"
  220. Visibility="{Binding TradeViewModel.IsSellVsb,
  221. Converter={StaticResource BooleanToVisibilityConverter}}" />
  222. </StackPanel>
  223. </StackPanel>
  224. <StackPanel Margin="{Binding TradeViewModel.ShowMultUserFundsMargin}" Orientation="Horizontal">
  225. <!-- 类型 -->
  226. <TextBlock Grid.Row="3"
  227. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Type}"
  228. Visibility="{Binding TradeViewModel.IsOpenCloseVisible,
  229. Converter={StaticResource BooleanToVisibilityConverter}}" />
  230. <!-- 建仓,平仓,先平后建 -->
  231. <StackPanel Grid.Row="3"
  232. Grid.Column="1"
  233. Height="33"
  234. VerticalAlignment="Center"
  235. Orientation="Horizontal"
  236. Visibility="{Binding TradeViewModel.IsOpenCloseVisible,
  237. Converter={StaticResource BooleanToVisibilityConverter}}">
  238. <!-- 先平后建》注销 -->
  239. <!--
  240. <RadioButton x:Name="radCloseOpen"
  241. Margin="20,0,0,0"
  242. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_CloseToOpen}"
  243. IsChecked="{Binding TradeViewModel.OpenCloseMode,
  244. ConverterParameter=3,
  245. Converter={StaticResource EnumBooleanConvert}}"
  246. IsEnabled="{Binding TradeViewModel.IsOpenCloseEdit}"
  247. Style="{DynamicResource RadioButtonStyle}"
  248. TabIndex="21"
  249. Visibility="{Binding TradeViewModel.IsCloseOpenVbs,
  250. Converter={StaticResource BooleanToVisibilityConverter}}" />
  251. -->
  252. <RadioButton x:Name="radOpen"
  253. Margin="20,0,0,0"
  254. Command="{Binding TradeViewModel.SelectOpenCloseCommand}"
  255. CommandParameter="1"
  256. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Open}"
  257. IsChecked="{Binding TradeViewModel.OpenCloseMode,
  258. ConverterParameter=1,
  259. Converter={StaticResource EnumBooleanConvert}}"
  260. IsEnabled="{Binding TradeViewModel.IsEnableSelectOpenMode}"
  261. Style="{DynamicResource RadioButtonStyle}"
  262. TabIndex="22"
  263. Visibility="{Binding TradeViewModel.IsEnableSelectOpenMode,
  264. Converter={StaticResource BooleanToVisibilityConverter}}" />
  265. <RadioButton x:Name="radClose"
  266. Margin="20,0,0,0"
  267. Command="{Binding TradeViewModel.SelectOpenCloseCommand}"
  268. CommandParameter="2"
  269. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Close}"
  270. IsChecked="{Binding TradeViewModel.OpenCloseMode,
  271. ConverterParameter=2,
  272. Converter={StaticResource EnumBooleanConvert}}"
  273. IsEnabled="{Binding TradeViewModel.IsCloseEnable}"
  274. Style="{DynamicResource RadioButtonStyle}"
  275. TabIndex="23"
  276. Visibility="{Binding TradeViewModel.IsCloseEnable,
  277. Converter={StaticResource BooleanToVisibilityConverter}}" />
  278. <RadioButton x:Name="autoOpenClose"
  279. Margin="20,0,0,0"
  280. Command="{Binding TradeViewModel.SelectOpenCloseCommand}"
  281. CommandParameter="3"
  282. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Auto_Open_Close}"
  283. IsChecked="{Binding TradeViewModel.OpenCloseMode,
  284. ConverterParameter=3,
  285. Converter={StaticResource EnumBooleanConvert}}"
  286. IsEnabled="{Binding TradeViewModel.ShowOpenCloseOrder}"
  287. Style="{DynamicResource RadioButtonStyle}"
  288. TabIndex="24"
  289. Visibility="Collapsed" />
  290. </StackPanel>
  291. </StackPanel>
  292. <!-- 点选类型 -->
  293. <StackPanel Orientation="Horizontal">
  294. <TextBlock Grid.Row="5"
  295. Text="点选类型"
  296. Visibility="{Binding TradeViewModel.IsVisibility_Listing}" />
  297. <!-- 挂牌1,摘牌2,先摘后挂3 -->
  298. <StackPanel Grid.Row="5"
  299. Grid.Column="1"
  300. Height="33"
  301. VerticalAlignment="Center"
  302. Orientation="Horizontal"
  303. Visibility="{Binding TradeViewModel.IsVisibility_Listing}">
  304. <RadioButton x:Name="rad_LISTING"
  305. Margin="20,0,0,0"
  306. Content="挂牌"
  307. IsChecked="{Binding TradeViewModel.ListingSelectModel,
  308. ConverterParameter=1,
  309. Converter={StaticResource EnumBooleanConvert}}"
  310. Style="{DynamicResource RadioButtonStyle}" />
  311. <RadioButton x:Name="rad_DELISTING"
  312. Margin="20,0"
  313. Content="摘牌"
  314. IsChecked="{Binding TradeViewModel.ListingSelectModel,
  315. ConverterParameter=2,
  316. Converter={StaticResource EnumBooleanConvert}}"
  317. Style="{DynamicResource RadioButtonStyle}" />
  318. <RadioButton x:Name="rad_DELISTINGTHENLISTING"
  319. Content="先摘后挂"
  320. IsChecked="{Binding TradeViewModel.ListingSelectModel,
  321. ConverterParameter=3,
  322. Converter={StaticResource EnumBooleanConvert}}"
  323. Style="{DynamicResource RadioButtonStyle}" />
  324. </StackPanel>
  325. </StackPanel>
  326. <!-- 摘牌类型 -->
  327. <StackPanel Orientation="Horizontal" Visibility="{Binding TradeViewModel.IsVisibility_DelistingModel, Converter={StaticResource BooleanToVisibilityConverter}}">
  328. <TextBlock Grid.Row="6" Text="摘牌类型" />
  329. <!-- 价格最优1,点选成交2 -->
  330. <StackPanel Grid.Row="6"
  331. Grid.Column="1"
  332. Height="33"
  333. VerticalAlignment="Center"
  334. Orientation="Horizontal">
  335. <RadioButton x:Name="rad_DELISTINGTYPE_PRICE"
  336. Margin="20,0,0,0"
  337. Content="价格最优"
  338. IsChecked="{Binding TradeViewModel.DelistingModel,
  339. ConverterParameter=1,
  340. Converter={StaticResource EnumBooleanConvert}}"
  341. Style="{DynamicResource RadioButtonStyle}" />
  342. <RadioButton x:Name="rad_DELISTINGTYPE_SELECTED"
  343. Margin="20,0"
  344. Content="点选成交"
  345. IsChecked="{Binding TradeViewModel.DelistingModel,
  346. ConverterParameter=2,
  347. Converter={StaticResource EnumBooleanConvert}}"
  348. Style="{DynamicResource RadioButtonStyle}"
  349. Visibility="{Binding TradeViewModel.IsVisibility_ListingSelect,
  350. Converter={StaticResource BooleanToVisibilityConverter}}" />
  351. </StackPanel>
  352. </StackPanel>
  353. <!-- 摘牌单据信息 -->
  354. <StackPanel Margin="0,10"
  355. Orientation="Horizontal"
  356. Visibility="{Binding TradeViewModel.IsVisibility_ListingInfo}">
  357. <TextBlock>
  358. <Run Text="委托单号 " />
  359. <Run Text="{Binding TradeViewModel.OrderId_Listing}" />
  360. <Run Text="价格:" />
  361. <Run Text="{Binding TradeViewModel.OrderPrice_Listing}" />
  362. </TextBlock>
  363. </StackPanel>
  364. </StackPanel>
  365. <!-- 通道交易 价格方式 -->
  366. <TextBlock Grid.Row="4"
  367. Text="价格方式"
  368. Visibility="{Binding TradeViewModel.IsVisibilityChannelTrade,
  369. Converter={StaticResource BooleanToVisibilityConverter}}" />
  370. <utilities:FocusComboBox x:Name="ChannelPriceMode"
  371. Grid.Row="4"
  372. Grid.Column="1"
  373. Width="150"
  374. Margin="20,5,0,5"
  375. HorizontalAlignment="Left"
  376. VerticalAlignment="Center"
  377. HorizontalContentAlignment="Center"
  378. DisplayMemberPath="Value"
  379. ItemsSource="{Binding TradeViewModel.ChannelPriceModeList}"
  380. SelectedIndex="0"
  381. SelectedValue="{Binding TradeViewModel.CurrentChannelPriceMode,
  382. Mode=TwoWay}"
  383. SelectedValuePath="Key"
  384. Style="{DynamicResource SimpleComboBoxStyle}"
  385. TabIndex="4"
  386. Visibility="{Binding TradeViewModel.IsVisibilityChannelTrade}" />
  387. <!-- 市/限价格 -->
  388. <TextBlock Grid.Row="4"
  389. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Price}"
  390. Visibility="{Binding TradeViewModel.IsPriceModeVisible,
  391. Converter={StaticResource BooleanToVisibilityConverter}}" />
  392. <StackPanel Grid.Row="4"
  393. Grid.Column="1"
  394. Height="33"
  395. VerticalAlignment="Center"
  396. Orientation="Horizontal"
  397. Visibility="{Binding TradeViewModel.IsPriceModeVisible,
  398. Converter={StaticResource BooleanToVisibilityConverter}}">
  399. <RadioButton x:Name="radLimitPrice"
  400. Margin="20,0,0,0"
  401. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Limit}"
  402. IsChecked="{Binding TradeViewModel.PriceMode,
  403. ConverterParameter=2,
  404. Converter={StaticResource EnumBooleanConvert}}"
  405. IsEnabled="{Binding TradeViewModel.IsLimitPriceEnable}"
  406. Style="{DynamicResource RadioButtonStyle}"
  407. TabIndex="5"
  408. Visibility="{Binding IsLimitPriceVisibity,
  409. Converter={StaticResource BooleanToVisibilityConverter}}" />
  410. <RadioButton x:Name="RadMarketPrice"
  411. Margin="20,0,0,0"
  412. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Market}"
  413. IsChecked="{Binding TradeViewModel.PriceMode,
  414. ConverterParameter=1,
  415. Converter={StaticResource EnumBooleanConvert}}"
  416. Style="{DynamicResource RadioButtonStyle}"
  417. TabIndex="6"
  418. Visibility="{Binding TradeViewModel.IsMarketPriceVisibity,
  419. Converter={StaticResource BooleanToVisibilityConverter}}" />
  420. </StackPanel>
  421. <TextBlock Grid.Row="5"
  422. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Price}"
  423. Visibility="{Binding TradeViewModel.IsExecutePriceVbs,
  424. Converter={StaticResource BooleanToVisibilityConverter}}" />
  425. <StackPanel Grid.Row="5"
  426. Grid.Column="1"
  427. Height="33"
  428. Orientation="Horizontal"
  429. Visibility="{Binding TradeViewModel.IsExecutePriceVbs,
  430. Converter={StaticResource BooleanToVisibilityConverter}}">
  431. <utilities:FocusDecimalNumBox x:Name="PriceNumBox"
  432. Width="150"
  433. Margin="20,0,0,0"
  434. HorizontalAlignment="Left"
  435. VerticalAlignment="Center"
  436. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  437. FormatString="{Binding TradeViewModel.PriceFormat}"
  438. Increment="{Binding TradeViewModel.PriceMinUnit}"
  439. IsEnabled="{Binding TradeViewModel.IsExecutePrice}"
  440. Minimum="0"
  441. Style="{DynamicResource DecimalNewUpDownStyle}"
  442. TabIndex="7"
  443. Text="{Binding TradeViewModel.ExecutePrice,
  444. Mode=TwoWay,
  445. UpdateSourceTrigger=PropertyChanged}" />
  446. <TextBlock HorizontalAlignment="Left"
  447. VerticalAlignment="Center"
  448. FontWeight="Normal"
  449. Visibility="{Binding TradeViewModel.IsPriceRangeVsb,
  450. Converter={StaticResource BooleanToVisibilityConverter}}"><Run Text="≥" /><Run Text="{Binding TradeViewModel.DisplayMaxLimit, Mode=OneWay}" /><Run Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Trade_Or}" /><Run Text="≤" /><Run Text="{Binding TradeViewModel.DisplayMinLimit, Mode=OneWay}" />
  451. </TextBlock>
  452. </StackPanel>
  453. <TextBlock Grid.Row="6" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lot}" />
  454. <!-- 数量 -->
  455. <StackPanel Grid.Row="6"
  456. Grid.Column="1"
  457. Height="33"
  458. Orientation="Horizontal">
  459. <utilities:FocusDecimalNumBox x:Name="DecimalNum"
  460. Width="150"
  461. Margin="20,0,0,0"
  462. VerticalAlignment="Center"
  463. DecimalCount="0"
  464. DefaultValue="0"
  465. DisplayDefaultValueOnEmptyText="True"
  466. Focusable="True"
  467. Increment="{Binding TradeViewModel.MinLot}"
  468. IsEnabled="{Binding TradeViewModel.IsEnableChangeLot}"
  469. Maximum="9223372036854775807"
  470. Minimum="1"
  471. Style="{DynamicResource DecimalNewUpDownStyle}"
  472. TabIndex="4"
  473. Value="{Binding TradeViewModel.Lot,
  474. Mode=TwoWay}" />
  475. <TextBlock Margin="5,0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Hand}" />
  476. <!--
  477. <TextBox Width="60"
  478. Margin="10,10,0,10"
  479. VerticalAlignment="Center"
  480. IsReadOnly="True"
  481. Style="{DynamicResource RectangleTextBox}"
  482. Text="{Binding TradeViewModel.RelationNum,
  483. Mode=OneWay}" />
  484. <TextBlock Margin="10,0,0,0" Text="{Binding TradeViewModel.AgreeUnitType}" />
  485. -->
  486. <TextBlock Margin="10,0,0,0"
  487. HorizontalAlignment="Left"
  488. Visibility="{Binding TradeViewModel.IsLotMaxVsb,
  489. Converter={StaticResource BooleanToVisibilityConverter}}"><Run Text="≤" /><Run Text=" " /><Run Text="{Binding TradeViewModel.MaxLot, Mode=OneWay}" /><Run Text=" " /><Run Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Hand}" />
  490. </TextBlock>
  491. </StackPanel>
  492. <!-- end数量 -->
  493. <StackPanel Grid.Row="7"
  494. Grid.Column="1"
  495. Height="33"
  496. Orientation="Horizontal"
  497. Visibility="{Binding TradeViewModel.IsAllowPipsVsb,
  498. Converter={StaticResource BooleanToVisibilityConverter}}">
  499. <TextBlock Margin="20,0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Permit_Range}" />
  500. <controls:DecimalNumBox Width="150"
  501. HorizontalAlignment="Left"
  502. VerticalAlignment="Center"
  503. FormatString="F0"
  504. Minimum="0"
  505. Style="{DynamicResource DecimalNewUpDownStyle}"
  506. TabIndex="8"
  507. Text="{Binding TradeViewModel.Pips,
  508. Mode=TwoWay,
  509. UpdateSourceTrigger=PropertyChanged}" />
  510. </StackPanel>
  511. <StackPanel Grid.Row="9"
  512. Grid.Column="1"
  513. Height="33"
  514. VerticalAlignment="Center"
  515. Orientation="Horizontal"
  516. Visibility="Collapsed">
  517. <!-- 不显示有效期 -->
  518. <RadioButton Margin="20,0"
  519. VerticalAlignment="Center"
  520. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_ExpirationType_Today}"
  521. IsChecked="{Binding TradeViewModel.CurrentExpirationType,
  522. ConverterParameter=0,
  523. Converter={StaticResource EnumBooleanConvert}}"
  524. Style="{DynamicResource RadioButtonStyle}" />
  525. <RadioButton Margin="20,0"
  526. VerticalAlignment="Center"
  527. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_ExpirationType_Week}"
  528. IsChecked="{Binding TradeViewModel.CurrentExpirationType,
  529. ConverterParameter=1,
  530. Converter={StaticResource EnumBooleanConvert}}"
  531. Style="{DynamicResource RadioButtonStyle}"
  532. Visibility="Hidden" />
  533. </StackPanel>
  534. <!-- 止盈 -->
  535. <Grid Grid.Row="10"
  536. Grid.Column="0"
  537. Grid.ColumnSpan="3"
  538. Width="280"
  539. Height="33"
  540. Margin="5,0,0,0"
  541. HorizontalAlignment="Left"
  542. Visibility="{Binding TradeViewModel.IsStopPLVsb,
  543. Converter={StaticResource BooleanToVisibilityConverter}}">
  544. <Grid.ColumnDefinitions>
  545. <ColumnDefinition Width="50" />
  546. <ColumnDefinition Width="Auto" />
  547. <ColumnDefinition Width="Auto" />
  548. </Grid.ColumnDefinitions>
  549. <CheckBox x:Name="ProfitBox"
  550. Width="50"
  551. VerticalAlignment="Center"
  552. Content="{x:Static resources:Client_Resource.Trade_Profit}"
  553. IsChecked="{Binding TradeViewModel.StopProfitChecked,
  554. Mode=TwoWay}"
  555. Style="{DynamicResource mtpCheckBoxStyle}"
  556. TabIndex="9" />
  557. <StackPanel Grid.Column="1" Orientation="Horizontal">
  558. <controls:DecimalNumBox Width="100"
  559. VerticalAlignment="Center"
  560. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  561. FormatString="{Binding TradeViewModel.PriceFormat}"
  562. Increment="{Binding TradeViewModel.PriceMinUnit}"
  563. IsEnabled="{Binding IsChecked,
  564. ElementName=ProfitBox}"
  565. Minimum="{Binding TradeViewModel.PriceMinUnit}"
  566. Style="{DynamicResource DecimalNewUpDownStyle}"
  567. TabIndex="10"
  568. Text="{Binding TradeViewModel.StopProfit,
  569. UpdateSourceTrigger=PropertyChanged}" />
  570. <TextBlock Margin="0,5" FontWeight="Normal"><Run Text="{Binding TradeViewModel.ProfitChar, Mode=OneWay}" /><Run Text="{Binding TradeViewModel.DisplayMaxProfit, Mode=OneWay}" />
  571. </TextBlock>
  572. </StackPanel>
  573. <StackPanel Grid.Column="2"
  574. VerticalAlignment="Center"
  575. Orientation="Horizontal">
  576. <TextBlock Margin="5,0"
  577. FontWeight="Normal"
  578. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Tick}" />
  579. <TextBox Width="50"
  580. VerticalAlignment="Center"
  581. IsReadOnly="True"
  582. Style="{DynamicResource RectangleTextBox}"
  583. Text="{Binding TradeViewModel.StopProfitPips,
  584. Mode=OneWay}" />
  585. </StackPanel>
  586. </Grid>
  587. <!-- 止损 -->
  588. <Grid Grid.Row="11"
  589. Grid.ColumnSpan="3"
  590. Width="280"
  591. Height="33"
  592. Margin="5,0,0,0"
  593. HorizontalAlignment="Left"
  594. Visibility="{Binding TradeViewModel.IsStopPLVsb,
  595. Converter={StaticResource BooleanToVisibilityConverter}}">
  596. <Grid.ColumnDefinitions>
  597. <ColumnDefinition Width="50" />
  598. <ColumnDefinition Width="Auto" />
  599. <ColumnDefinition Width="Auto" />
  600. </Grid.ColumnDefinitions>
  601. <CheckBox x:Name="LossBox"
  602. VerticalAlignment="Center"
  603. Content="{x:Static resources:Client_Resource.Trade_Stop}"
  604. IsChecked="{Binding TradeViewModel.StopLossChecked,
  605. Mode=TwoWay}"
  606. Style="{DynamicResource mtpCheckBoxStyle}"
  607. TabIndex="11" />
  608. <StackPanel Grid.Column="1" Orientation="Horizontal">
  609. <controls:DecimalNumBox Width="100"
  610. VerticalAlignment="Center"
  611. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  612. FormatString="{Binding TradeViewModel.PriceFormat}"
  613. Increment="{Binding TradeViewModel.PriceMinUnit}"
  614. IsEnabled="{Binding IsChecked,
  615. ElementName=LossBox}"
  616. Minimum="{Binding TradeViewModel.PriceMinUnit}"
  617. Style="{DynamicResource DecimalNewUpDownStyle}"
  618. TabIndex="12"
  619. Text="{Binding TradeViewModel.StopLoss,
  620. UpdateSourceTrigger=PropertyChanged}" />
  621. <TextBlock Margin="0,5" FontWeight="Normal"><Run Text="{Binding TradeViewModel.LossChar, Mode=OneWay}" /><Run Text="{Binding TradeViewModel.DisplayMaxLoss, Mode=OneWay}" />
  622. </TextBlock>
  623. </StackPanel>
  624. <StackPanel Grid.Column="2"
  625. VerticalAlignment="Center"
  626. Orientation="Horizontal">
  627. <TextBlock Margin="5,0"
  628. FontWeight="Normal"
  629. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Tick}" />
  630. <TextBox Width="50"
  631. VerticalAlignment="Center"
  632. IsReadOnly="True"
  633. Style="{DynamicResource RectangleTextBox}"
  634. Text="{Binding TradeViewModel.StopLossPips,
  635. Mode=OneWay}" />
  636. </StackPanel>
  637. </Grid>
  638. <Grid Grid.Row="12"
  639. Grid.ColumnSpan="2"
  640. Margin="0,5,0,0"
  641. Visibility="{Binding TradeViewModel.IsOrderOptionVisible,
  642. Converter={StaticResource BooleanToVisibilityConverter}}">
  643. <Grid.RowDefinitions>
  644. <RowDefinition Height="*" />
  645. <RowDefinition Height="Auto" />
  646. </Grid.RowDefinitions>
  647. <StackPanel Grid.Row="1"
  648. Margin="0,15"
  649. HorizontalAlignment="Center"
  650. Orientation="Horizontal">
  651. <!-- 买入 -->
  652. <Border Width="90"
  653. HorizontalAlignment="Left"
  654. VerticalAlignment="Top"
  655. Background="{Binding TradeViewModel.BuyBackGroundBrush}"
  656. BorderBrush="{Binding TradeViewModel.BuyBackGroundBrush}"
  657. CornerRadius="4, 4, 4, 4">
  658. <StackPanel x:Name="BuyCommissions"
  659. Width="90"
  660. Background="Transparent"
  661. IsEnabled="{Binding TradeViewModel.CanUseBuy}"
  662. Orientation="Vertical">
  663. <i:Interaction.Triggers>
  664. <i:EventTrigger EventName="MouseLeftButtonDown">
  665. <i:InvokeCommandAction Command="{Binding TradionOKCommand}" CommandParameter="0" />
  666. </i:EventTrigger>
  667. </i:Interaction.Triggers>
  668. <TextBlock Margin="0, 3, 0, 0"
  669. HorizontalAlignment="Center"
  670. Background="Transparent"
  671. FontWeight="Bold"
  672. Text="{Binding TradeViewModel.ChannelBuyPrice}" />
  673. <Path Width="80"
  674. Height="2"
  675. Data="F1M1,2C1,2 1,1 1,1 1,1 160,1 160,1 160,1 160,2 160,2 160,2 1,2 1,2z"
  676. Fill="White">
  677. <Path.Effect>
  678. <DropShadowEffect BlurRadius="0"
  679. Direction="-270"
  680. Color="White" />
  681. </Path.Effect>
  682. </Path>
  683. <TextBlock Margin="0, 2, 0, 3"
  684. HorizontalAlignment="Center"
  685. FontSize="16"
  686. FontWeight="Bold"
  687. Text="买入" />
  688. </StackPanel>
  689. </Border>
  690. <!-- 卖出 -->
  691. <Border Width="90"
  692. Margin="50, 0, 0, 0"
  693. HorizontalAlignment="Left"
  694. VerticalAlignment="Top"
  695. Background="{Binding TradeViewModel.SellBackGroundBrush}"
  696. BorderBrush="{Binding TradeViewModel.SellBackGroundBrush}"
  697. CornerRadius="4, 4, 4, 4">
  698. <StackPanel x:Name="SellCommissions"
  699. Width="90"
  700. Background="Transparent"
  701. IsEnabled="{Binding TradeViewModel.CanUseSell}"
  702. Orientation="Vertical">
  703. <i:Interaction.Triggers>
  704. <i:EventTrigger EventName="MouseLeftButtonDown">
  705. <i:InvokeCommandAction Command="{Binding TradionOKCommand}" CommandParameter="1" />
  706. </i:EventTrigger>
  707. </i:Interaction.Triggers>
  708. <TextBlock Margin="0, 3, 0, 0"
  709. HorizontalAlignment="Center"
  710. Background="Transparent"
  711. FontWeight="Bold"
  712. Text="{Binding TradeViewModel.ChannelSellPrice}" />
  713. <Path Width="80"
  714. Height="2"
  715. Data="F1M1,2C1,2 1,1 1,1 1,1 160,1 160,1 160,1 160,2 160,2 160,2 1,2 1,2z"
  716. Fill="White">
  717. <Path.Effect>
  718. <DropShadowEffect BlurRadius="0"
  719. Direction="-270"
  720. Color="White" />
  721. </Path.Effect>
  722. </Path>
  723. <TextBlock Margin="0, 2, 0, 3"
  724. HorizontalAlignment="Center"
  725. FontSize="16"
  726. FontWeight="Bold"
  727. Text="{x:Static resources:Client_Resource.Content_SellOut}" />
  728. </StackPanel>
  729. </Border>
  730. </StackPanel>
  731. <!-- 改了接口,Command是有问题的 -->
  732. <Button x:Name="btnMouseDown"
  733. Grid.Row="1"
  734. Width="82"
  735. Height="26"
  736. Margin="50,0,0,0"
  737. HorizontalAlignment="Left"
  738. VerticalAlignment="Top"
  739. Command="{Binding TradionOKCommand,
  740. ConverterParameter=2}"
  741. Content="{x:Static resources:Client_Resource.Button_Confirm}"
  742. Focusable="True"
  743. IsEnabled="{Binding OKButtonEnabled}"
  744. Style="{DynamicResource CommonButtonStyle}"
  745. TabIndex="12"
  746. Visibility="Collapsed" />
  747. <!--
  748. IsChecked="{Binding TradeViewModel.IsComplex}" Visibility="{Binding IsOKCommandVbs,
  749. Converter={StaticResource BooleanToVisibilityConverter}}"
  750. -->
  751. <CheckBox x:Name="corderBox"
  752. Grid.Row="1"
  753. Margin="20,5"
  754. HorizontalAlignment="Center"
  755. IsChecked="True"
  756. Style="{DynamicResource OrderCheckBoxStyle}"
  757. TabIndex="13"
  758. Visibility="Collapsed">
  759. <StackPanel>
  760. <TextBlock Text="{x:Static resources:Client_Resource.Order_Common_title}" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BooleanToVisibilityConverter}}" />
  761. <TextBlock Text="{x:Static resources:Client_Resource.Order_Topgrade_title}" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BoolOpposedVisibility}}" />
  762. </StackPanel>
  763. </CheckBox>
  764. <Grid Grid.Row="0" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BooleanToVisibilityConverter}}">
  765. <Grid.RowDefinitions>
  766. <RowDefinition Height="Auto" />
  767. <RowDefinition Height="Auto" />
  768. <RowDefinition Height="Auto" />
  769. <RowDefinition Height="Auto" />
  770. <RowDefinition Height="Auto" />
  771. <RowDefinition Height="Auto" />
  772. <RowDefinition Height="Auto" />
  773. </Grid.RowDefinitions>
  774. <Grid.ColumnDefinitions>
  775. <ColumnDefinition Width="Auto" />
  776. <ColumnDefinition />
  777. </Grid.ColumnDefinitions>
  778. <!-- 下单方式 正常单OR 预埋单 -->
  779. <TextBlock Grid.Row="0"
  780. Text="{x:Static resources:Client_Resource.OrderMethods}"
  781. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  782. Converter={StaticResource BooleanToVisibilityConverter}}" />
  783. <StackPanel Grid.Row="0"
  784. Grid.Column="1"
  785. Height="33"
  786. VerticalAlignment="Center"
  787. Orientation="Horizontal"
  788. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  789. Converter={StaticResource BooleanToVisibilityConverter}}">
  790. <RadioButton x:Name="radioBtn_normalOrder"
  791. Margin="20,0"
  792. Content="{x:Static resources:Client_Resource.NormalOrder}"
  793. IsChecked="{Binding TradeViewModel.OrderFlag,
  794. ConverterParameter=0,
  795. Converter={StaticResource EnumBooleanConvert}}"
  796. Style="{DynamicResource RadioButtonStyle}"
  797. TabIndex="14" />
  798. <RadioButton Margin="20,0"
  799. Content="{x:Static resources:Client_Resource.PreOrder}"
  800. IsChecked="{Binding TradeViewModel.OrderFlag,
  801. ConverterParameter=1,
  802. Converter={StaticResource EnumBooleanConvert}}"
  803. IsEnabled="{Binding TradeViewModel.IsEnableByPrePostOrder}"
  804. Style="{DynamicResource RadioButtonStyle}"
  805. TabIndex="16"
  806. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  807. Converter={StaticResource BooleanToVisibilityConverter}}" />
  808. </StackPanel>
  809. <StackPanel Grid.Row="1"
  810. Grid.Column="0"
  811. Grid.ColumnSpan="2"
  812. Height="33"
  813. VerticalAlignment="Center"
  814. Orientation="Horizontal"
  815. Visibility="{Binding IsChecked,
  816. ElementName=radioBtn_normalOrder,
  817. Converter={StaticResource BoolOpposedVisibility}}">
  818. <TextBlock Text="{x:Static resources:Client_Resource.TriggerPrice}" Visibility="{Binding IsChecked, ElementName=radioBtn_normalOrder, Converter={StaticResource BoolOpposedVisibility}}" />
  819. <ComboBox Width="50"
  820. Margin="20,0,0,0"
  821. HorizontalAlignment="Left"
  822. VerticalAlignment="Center"
  823. DisplayMemberPath="Value"
  824. ItemsSource="{Binding TradeViewModel.DicTriggerType}"
  825. SelectedValue="{Binding TradeViewModel.CurrentTirrgerType}"
  826. SelectedValuePath="Key"
  827. Style="{DynamicResource SimpleComboBoxStyle}"
  828. TabIndex="15"
  829. Visibility="{Binding IsChecked,
  830. ElementName=radioBtn_normalOrder,
  831. Converter={StaticResource BoolOpposedVisibility}}" />
  832. <controls:DecimalNumBox Width="120"
  833. Margin="20,0,0,0"
  834. HorizontalAlignment="Left"
  835. VerticalAlignment="Center"
  836. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  837. FormatString="{Binding TradeViewModel.PriceFormat}"
  838. Increment="{Binding TradeViewModel.PriceMinUnit}"
  839. Minimum="0"
  840. Style="{DynamicResource DecimalNewUpDownStyle}"
  841. TabIndex="17"
  842. Text="{Binding TradeViewModel.TriggerPrice,
  843. Mode=TwoWay,
  844. UpdateSourceTrigger=PropertyChanged}"
  845. Visibility="{Binding IsChecked,
  846. ElementName=radioBtn_normalOrder,
  847. Converter={StaticResource BoolOpposedVisibility}}" />
  848. </StackPanel>
  849. <!-- 杠杆 -->
  850. <TextBlock Grid.Row="2"
  851. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lever}"
  852. Visibility="Collapsed" />
  853. <StackPanel Grid.Row="2"
  854. Grid.Column="1"
  855. VerticalAlignment="Center"
  856. Orientation="Horizontal"
  857. Visibility="Collapsed">
  858. <RadioButton Margin="20,0"
  859. Content="10倍"
  860. IsChecked="{Binding TradeViewModel.MarginRate,
  861. ConverterParameter=1,
  862. Converter={StaticResource EnumBooleanConvert}}"
  863. Style="{DynamicResource RadioButtonStyle}"
  864. TabIndex="18" />
  865. <RadioButton Margin="20,0"
  866. Content="20倍"
  867. IsChecked="{Binding TradeViewModel.MarginRate,
  868. ConverterParameter=2,
  869. Converter={StaticResource EnumBooleanConvert}}"
  870. Style="{DynamicResource RadioButtonStyle}"
  871. TabIndex="19" />
  872. <RadioButton Margin="20,0"
  873. Content="40倍"
  874. IsChecked="{Binding TradeViewModel.MarginRate,
  875. ConverterParameter=3,
  876. Converter={StaticResource EnumBooleanConvert}}"
  877. Style="{DynamicResource RadioButtonStyle}"
  878. TabIndex="20" />
  879. </StackPanel>
  880. <!-- 按单/头寸 -->
  881. <Grid Grid.Row="4"
  882. Grid.Column="1"
  883. VerticalAlignment="Center"
  884. Visibility="Collapsed">
  885. <Grid.ColumnDefinitions>
  886. <ColumnDefinition Width="Auto" />
  887. <ColumnDefinition />
  888. </Grid.ColumnDefinitions>
  889. <Grid.RowDefinitions>
  890. <RowDefinition Height="33" />
  891. <RowDefinition Height="Auto" />
  892. </Grid.RowDefinitions>
  893. <RadioButton Margin="20,0,0,0"
  894. VerticalAlignment="Center"
  895. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_NetLot}"
  896. IsChecked="{Binding TradeViewModel.GoodsOrderMode,
  897. ConverterParameter=0,
  898. Converter={StaticResource EnumBooleanConvert}}"
  899. IsEnabled="{Binding TradeViewModel.IsCanGoodsEdit}"
  900. Style="{DynamicResource RadioButtonStyle}"
  901. TabIndex="25" />
  902. <RadioButton x:Name="RadOrder"
  903. Grid.Column="1"
  904. Margin="10,0"
  905. HorizontalAlignment="Left"
  906. VerticalAlignment="Center"
  907. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Bill}"
  908. IsChecked="{Binding TradeViewModel.GoodsOrderMode,
  909. ConverterParameter=1,
  910. Converter={StaticResource EnumBooleanConvert}}"
  911. IsEnabled="{Binding TradeViewModel.IsCanOrderEdit}"
  912. Style="{DynamicResource RadioButtonStyle}"
  913. TabIndex="26" />
  914. <ComboBox Grid.Row="1"
  915. Grid.Column="1"
  916. Width="130"
  917. Margin="0,0,5,0"
  918. HorizontalAlignment="Left"
  919. VerticalAlignment="Center"
  920. DisplayMemberPath="OrderID"
  921. ItemsSource="{Binding TradeViewModel.HoldDetails}"
  922. SelectedItem="{Binding TradeViewModel.SelectOrder}"
  923. Style="{DynamicResource SimpleComboBoxStyle}"
  924. TabIndex="27"
  925. Visibility="{Binding IsChecked,
  926. ElementName=RadOrder,
  927. Converter={StaticResource BooleanToVisibilityConverter}}" />
  928. </Grid>
  929. </Grid>
  930. </Grid>
  931. </Grid>
  932. <!-- OTC报价牌 -->
  933. <Border Grid.Column="0"
  934. Width="150"
  935. Margin="300,5,20,0"
  936. VerticalAlignment="Top"
  937. Background="{DynamicResource OrderPriceBackground}"
  938. BorderBrush="{DynamicResource CommonBorderBrush}"
  939. BorderThickness="1"
  940. CornerRadius="2"
  941. Visibility="{Binding TradeViewModel.IsBidAskVsb,
  942. Converter={StaticResource BooleanToVisibilityConverter}}">
  943. <Grid>
  944. <Grid.RowDefinitions>
  945. <RowDefinition />
  946. <RowDefinition Height="Auto" />
  947. <RowDefinition />
  948. <RowDefinition Height="Auto" />
  949. <RowDefinition />
  950. </Grid.RowDefinitions>
  951. <StackPanel Grid.Row="0"
  952. Height="44"
  953. Orientation="Horizontal">
  954. <TextBlock Margin="8,0,16,0"
  955. FontSize="12"
  956. Text="{x:Static resources:Client_Resource.Trade_Content_PurchasePrice}" />
  957. <border:ExpBorder VerticalAlignment="Center"
  958. BorderThickness="1"
  959. ChangeBrush="{Binding CurrentGoods.BidPriceColor}"
  960. IsBorderThickness="False"
  961. IsVauleChange="{Binding CurrentGoods.IsBidPriceBorder}"
  962. Padding="5,2">
  963. <zoom:ZoomFontText VerticalAlignment="Center"
  964. VerticalContentAlignment="Center"
  965. FontCount="{Binding Figures}"
  966. FontSize="20"
  967. FontWeight="Bold"
  968. Foreground="{Binding CurrentGoods.BidPriceColor}"
  969. Text="{Binding CurrentGoods.BidPriceDisplay}"
  970. ZoomFontSize="16" />
  971. </border:ExpBorder>
  972. </StackPanel>
  973. <Path Grid.Row="1"
  974. Grid.ColumnSpan="3"
  975. Width="140"
  976. Height="3"
  977. VerticalAlignment="Bottom"
  978. Data="F1M1,2C1,2 1,1 1,1 1,1 140,1 140,1 140,1 140,2 140,2 140,2 1,2 1,2z"
  979. Fill="{DynamicResource OrderBorderBrush}">
  980. <Path.Effect>
  981. <DropShadowEffect BlurRadius="0"
  982. Direction="-270"
  983. Opacity="0.25"
  984. ShadowDepth="1"
  985. Color="{DynamicResource BorderEffect}" />
  986. </Path.Effect>
  987. </Path>
  988. <StackPanel Grid.Row="2"
  989. Height="44"
  990. Orientation="Horizontal">
  991. <TextBlock Margin="8,0,16,0"
  992. FontSize="12"
  993. Text="{x:Static resources:Client_Resource.Trade_Content_SellPrice}" />
  994. <border:ExpBorder VerticalAlignment="Center"
  995. BorderThickness="1"
  996. ChangeBrush="{Binding CurrentGoods.AskPriceColor}"
  997. IsBorderThickness="False"
  998. IsVauleChange="{Binding CurrentGoods.IsAskPriceBorder}"
  999. Padding="5,2">
  1000. <zoom:ZoomFontText VerticalAlignment="Center"
  1001. VerticalContentAlignment="Center"
  1002. FontCount="{Binding Figures}"
  1003. FontSize="20"
  1004. FontWeight="Bold"
  1005. Foreground="{Binding CurrentGoods.AskPriceColor}"
  1006. Text="{Binding CurrentGoods.AskPriceDisplay}"
  1007. ZoomFontSize="16" />
  1008. </border:ExpBorder>
  1009. </StackPanel>
  1010. </Grid>
  1011. </Border>
  1012. <!-- end OTC报价牌 -->
  1013. <!-- Channel 报价牌 -->
  1014. <Border Grid.Column="0"
  1015. Width="150"
  1016. Margin="300,50,20,0"
  1017. VerticalAlignment="Top"
  1018. Background="{DynamicResource OrderPriceBackground}"
  1019. BorderBrush="{DynamicResource CommonBorderBrush}"
  1020. BorderThickness="1"
  1021. CornerRadius="2"
  1022. Visibility="{Binding ShowBuySellPriceArea,
  1023. Converter={StaticResource BooleanToVisibilityConverter}}">
  1024. <Grid>
  1025. <Grid.RowDefinitions>
  1026. <RowDefinition />
  1027. <RowDefinition Height="Auto" />
  1028. <RowDefinition />
  1029. <RowDefinition Height="Auto" />
  1030. <RowDefinition />
  1031. </Grid.RowDefinitions>
  1032. <StackPanel Grid.Row="0"
  1033. Height="44"
  1034. Orientation="Horizontal">
  1035. <TextBlock Margin="8,0,16,0"
  1036. FontSize="12"
  1037. Text="{x:Static resources:Client_Resource.Trade_Content_PurchasePrice}" />
  1038. <border:ExpBorder VerticalAlignment="Center"
  1039. BorderThickness="1"
  1040. ChangeBrush="{Binding CurrentGoods.BidPriceColor}"
  1041. IsBorderThickness="False"
  1042. IsVauleChange="{Binding CurrentGoods.IsBidPriceBorder}"
  1043. Padding="5,2">
  1044. <zoom:ZoomFontText VerticalAlignment="Center"
  1045. VerticalContentAlignment="Center"
  1046. FontCount="{Binding Figures}"
  1047. FontSize="20"
  1048. FontWeight="Bold"
  1049. Foreground="{Binding CurrentGoods.BidPriceColor}"
  1050. Text="{Binding CurrentGoods.BidPriceDisplay}"
  1051. ZoomFontSize="16" />
  1052. </border:ExpBorder>
  1053. </StackPanel>
  1054. <Path Grid.Row="1"
  1055. Grid.ColumnSpan="3"
  1056. Width="140"
  1057. Height="3"
  1058. VerticalAlignment="Bottom"
  1059. Data="F1M1,2C1,2 1,1 1,1 1,1 140,1 140,1 140,1 140,2 140,2 140,2 1,2 1,2z"
  1060. Fill="{DynamicResource OrderBorderBrush}">
  1061. <Path.Effect>
  1062. <DropShadowEffect BlurRadius="0"
  1063. Direction="-270"
  1064. Opacity="0.25"
  1065. ShadowDepth="1"
  1066. Color="{DynamicResource BorderEffect}" />
  1067. </Path.Effect>
  1068. </Path>
  1069. <StackPanel Grid.Row="2"
  1070. Height="44"
  1071. Orientation="Horizontal">
  1072. <TextBlock Margin="8,0,16,0"
  1073. FontSize="12"
  1074. Text="{x:Static resources:Client_Resource.Trade_Content_SellPrice}" />
  1075. <border:ExpBorder VerticalAlignment="Center"
  1076. BorderThickness="1"
  1077. ChangeBrush="{Binding CurrentGoods.AskPriceColor}"
  1078. IsBorderThickness="False"
  1079. IsVauleChange="{Binding CurrentGoods.IsAskPriceBorder}"
  1080. Padding="5,2">
  1081. <zoom:ZoomFontText VerticalAlignment="Center"
  1082. VerticalContentAlignment="Center"
  1083. FontCount="{Binding Figures}"
  1084. FontSize="20"
  1085. FontWeight="Bold"
  1086. Foreground="{Binding CurrentGoods.AskPriceColor}"
  1087. Text="{Binding CurrentGoods.AskPriceDisplay}"
  1088. ZoomFontSize="16" />
  1089. </border:ExpBorder>
  1090. </StackPanel>
  1091. </Grid>
  1092. </Border>
  1093. <!-- end Channel报价牌 -->
  1094. <Border x:Name="Bor_CommissionsHeight"
  1095. Width="230"
  1096. Height="280"
  1097. Margin="285,1,5,0"
  1098. HorizontalAlignment="Right"
  1099. VerticalAlignment="Top"
  1100. BorderBrush="{DynamicResource CommonBorderBrush}"
  1101. BorderThickness="1"
  1102. Visibility="{Binding TradeViewModel.IsBidQueueVsb,
  1103. Converter={StaticResource BooleanToVisibilityConverter}}">
  1104. <Grid>
  1105. <Grid.RowDefinitions>
  1106. <RowDefinition Height="Auto" />
  1107. <RowDefinition />
  1108. <RowDefinition Height="Auto" />
  1109. <RowDefinition />
  1110. <RowDefinition Height="Auto" />
  1111. <RowDefinition Height="Auto" />
  1112. </Grid.RowDefinitions>
  1113. <Grid.ColumnDefinitions>
  1114. <ColumnDefinition Width="40" />
  1115. <ColumnDefinition Width="1.5*" />
  1116. <ColumnDefinition Width="*" />
  1117. </Grid.ColumnDefinitions>
  1118. <TextBlock Grid.Column="1"
  1119. Margin="5,3"
  1120. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Price}" />
  1121. <TextBlock Grid.Column="2"
  1122. Margin="5,1"
  1123. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lot}" />
  1124. <Border Grid.Row="1"
  1125. Grid.RowSpan="3"
  1126. Grid.ColumnSpan="3"
  1127. Background="{DynamicResource OrderPriceBackground}"
  1128. BorderBrush="{DynamicResource CommonBorderBrush}"
  1129. BorderThickness="0,1" />
  1130. <ListBox x:Name="AskCommissionsListBox"
  1131. Grid.Row="1"
  1132. Grid.ColumnSpan="3"
  1133. VerticalAlignment="Bottom"
  1134. Background="Transparent"
  1135. BorderBrush="Transparent"
  1136. FontSize="13"
  1137. IsTabStop="False"
  1138. ItemContainerStyle="{DynamicResource BidPriceListBoxItem}"
  1139. ItemTemplate="{DynamicResource AskDataTemplate}"
  1140. ItemsSource="{Binding TradeViewModel.AskCommissions}"
  1141. MouseLeave="AskCommissionsListBox_MouseLeave"
  1142. SelectedItem="{Binding TradeViewModel.CurrentCommission}"
  1143. Style="{DynamicResource BidPriceListBox}">
  1144. <i:Interaction.Triggers>
  1145. <i:EventTrigger EventName="MouseLeftButtonDown">
  1146. <i:InvokeCommandAction Command="{Binding TradeViewModel.CommissionsListBoxCommand}" CommandParameter="{Binding SelectedItem, ElementName=AskCommissionsListBox}" />
  1147. </i:EventTrigger>
  1148. </i:Interaction.Triggers>
  1149. </ListBox>
  1150. <Path Grid.Row="2"
  1151. Grid.ColumnSpan="3"
  1152. Width="170"
  1153. Height="3"
  1154. VerticalAlignment="Bottom"
  1155. Data="F1M1,2C1,2 1,1 1,1 1,1 160,1 160,1 160,1 160,2 160,2 160,2 1,2 1,2z"
  1156. Fill="{DynamicResource OrderBorderBrush}">
  1157. <Path.Effect>
  1158. <DropShadowEffect BlurRadius="0"
  1159. Direction="-270"
  1160. Opacity="0.25"
  1161. ShadowDepth="1"
  1162. Color="{DynamicResource BorderEffect}" />
  1163. </Path.Effect>
  1164. </Path>
  1165. <ListBox x:Name="BidCommissionsListBox"
  1166. Grid.Row="3"
  1167. Grid.ColumnSpan="3"
  1168. VerticalAlignment="Top"
  1169. Background="Transparent"
  1170. BorderBrush="Transparent"
  1171. FontSize="13"
  1172. IsTabStop="False"
  1173. ItemContainerStyle="{DynamicResource BidPriceListBoxItem}"
  1174. ItemTemplate="{DynamicResource BidDataTemplate}"
  1175. ItemsSource="{Binding TradeViewModel.BidCommissions}"
  1176. MouseLeave="BidCommissionsListBox_MouseLeave"
  1177. SelectedItem="{Binding TradeViewModel.CurrentCommission}"
  1178. Style="{DynamicResource BidPriceListBox}">
  1179. <i:Interaction.Triggers>
  1180. <i:EventTrigger EventName="MouseLeftButtonDown">
  1181. <i:InvokeCommandAction Command="{Binding TradeViewModel.CommissionsListBoxCommand}" CommandParameter="{Binding SelectedItem, ElementName=BidCommissionsListBox}" />
  1182. </i:EventTrigger>
  1183. </i:Interaction.Triggers>
  1184. </ListBox>
  1185. <Grid Grid.Row="4" Grid.ColumnSpan="3">
  1186. <Grid.RowDefinitions>
  1187. <RowDefinition />
  1188. <RowDefinition Height="1" />
  1189. <RowDefinition />
  1190. </Grid.RowDefinitions>
  1191. <Grid.ColumnDefinitions>
  1192. <ColumnDefinition />
  1193. <ColumnDefinition Width="3" />
  1194. <ColumnDefinition />
  1195. </Grid.ColumnDefinitions>
  1196. <TextBlock Margin="4,4"
  1197. HorizontalAlignment="Left"
  1198. Text="{x:Static resources:Client_Resource.Trade_CurrentPrice}" />
  1199. <TextBlock Width="60"
  1200. HorizontalAlignment="Right"
  1201. Foreground="{Binding CurrentGoods.CurrentPriceColor}"
  1202. MouseDown="UIElement_OnMouseDown"
  1203. Tag="{Binding CurrentGoods.CurrentPrice}"
  1204. Text="{Binding CurrentGoods.CurrentPrice,
  1205. Mode=OneWay}"
  1206. TextTrimming="CharacterEllipsis"
  1207. TextWrapping="NoWrap">
  1208. <TextBlock.ToolTip>
  1209. <StackPanel>
  1210. <TextBlock>
  1211. <Run Foreground="Black" Text="{Binding CurrentGoods.CurrentPrice, Mode=OneWay}" />
  1212. </TextBlock>
  1213. </StackPanel>
  1214. </TextBlock.ToolTip>
  1215. </TextBlock>
  1216. <TextBlock Grid.Column="2"
  1217. HorizontalAlignment="Left"
  1218. Text="{x:Static resources:Client_Resource.Trade_BidIncrement_Title}"
  1219. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1220. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1221. <TextBlock Grid.Column="2"
  1222. Width="60"
  1223. HorizontalAlignment="Right"
  1224. Foreground="{DynamicResource QuoteAscBrush}"
  1225. MouseDown="UIElement_OnMouseDown"
  1226. Tag="{Binding TradeViewModel.UpPrice}"
  1227. Text="{Binding TradeViewModel.UpPriceDisplay,
  1228. Mode=OneWay}"
  1229. TextTrimming="CharacterEllipsis"
  1230. TextWrapping="NoWrap"
  1231. ToolTip="{Binding TradeViewModel.UpPriceDisplay,
  1232. Mode=OneWay}"
  1233. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1234. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1235. <TextBlock Grid.Row="2"
  1236. Margin="4,4"
  1237. HorizontalAlignment="Left"
  1238. Text="{x:Static resources:Client_Resource.Trade_Last}" />
  1239. <TextBlock Grid.Row="2"
  1240. Width="60"
  1241. HorizontalAlignment="Right"
  1242. MouseDown="UIElement_OnMouseDown"
  1243. Tag="{Binding CurrentGoods.LastClose,
  1244. Mode=OneWay}"
  1245. Text="{Binding CurrentGoods.LastClose,
  1246. Mode=OneWay}"
  1247. TextTrimming="CharacterEllipsis"
  1248. TextWrapping="NoWrap">
  1249. <TextBlock.ToolTip>
  1250. <StackPanel>
  1251. <TextBlock>
  1252. <Run Foreground="Black" Text="{Binding CurrentGoods.LastClose, Mode=OneWay}" />
  1253. </TextBlock>
  1254. </StackPanel>
  1255. </TextBlock.ToolTip>
  1256. </TextBlock>
  1257. <TextBlock Grid.Row="2"
  1258. Grid.Column="2"
  1259. HorizontalAlignment="Left"
  1260. Text="{x:Static resources:Client_Resource.Trade_BidBlow_Title}"
  1261. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1262. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1263. <TextBlock Grid.Row="2"
  1264. Grid.Column="2"
  1265. Width="60"
  1266. HorizontalAlignment="Right"
  1267. Foreground="{DynamicResource QuoteDecBrush}"
  1268. MouseDown="UIElement_OnMouseDown"
  1269. Tag="{Binding TradeViewModel.LowPrice,
  1270. Mode=OneWay}"
  1271. Text="{Binding TradeViewModel.LowPriceDisplay,
  1272. Mode=OneWay}"
  1273. TextTrimming="CharacterEllipsis"
  1274. TextWrapping="NoWrap"
  1275. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1276. Converter={StaticResource BooleanToVisibilityConverter}}">
  1277. <TextBlock.ToolTip>
  1278. <StackPanel>
  1279. <TextBlock>
  1280. <Run Foreground="Black" Text="{Binding TradeViewModel.LowPriceDisplay, Mode=OneWay}" />
  1281. </TextBlock>
  1282. </StackPanel>
  1283. </TextBlock.ToolTip>
  1284. </TextBlock>
  1285. </Grid>
  1286. </Grid>
  1287. </Border>
  1288. </Grid>
  1289. </UserControl>