OrderContent.xaml 77 KB

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