OrderContent.xaml 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  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="{Binding TradeViewModel.ShowOpenCloseOrder,
  290. Converter={StaticResource BooleanToVisibilityConverter}}" />
  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,0,0,0"
  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,
  445. Mode=TwoWay,
  446. UpdateSourceTrigger=PropertyChanged}" />
  447. <TextBlock HorizontalAlignment="Left"
  448. VerticalAlignment="Center"
  449. FontWeight="Normal"
  450. Visibility="{Binding TradeViewModel.IsPriceRangeVsb,
  451. 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}" />
  452. </TextBlock>
  453. </StackPanel>
  454. <TextBlock Grid.Row="6" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lot}" />
  455. <!-- 数量 -->
  456. <StackPanel Grid.Row="6"
  457. Grid.Column="1"
  458. Height="33"
  459. Orientation="Horizontal">
  460. <utilities:FocusDecimalNumBox x:Name="DecimalNum"
  461. Width="150"
  462. Margin="20,0,0,0"
  463. VerticalAlignment="Center"
  464. DecimalCount="0"
  465. DefaultValue="0"
  466. DisplayDefaultValueOnEmptyText="True"
  467. Focusable="True"
  468. Increment="{Binding TradeViewModel.MinLot}"
  469. IsEnabled="{Binding TradeViewModel.IsEnableChangeLot}"
  470. Maximum="9223372036854775807"
  471. Minimum="1"
  472. Style="{DynamicResource DecimalNewUpDownStyle}"
  473. TabIndex="4"
  474. Value="{Binding TradeViewModel.Lot,
  475. Mode=TwoWay}" />
  476. <TextBlock Margin="5,0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Hand}" />
  477. <!--
  478. <TextBox Width="60"
  479. Margin="10,10,0,10"
  480. VerticalAlignment="Center"
  481. IsReadOnly="True"
  482. Style="{DynamicResource RectangleTextBox}"
  483. Text="{Binding TradeViewModel.RelationNum,
  484. Mode=OneWay}" />
  485. <TextBlock Margin="10,0,0,0" Text="{Binding TradeViewModel.AgreeUnitType}" />
  486. -->
  487. <TextBlock Margin="10,0,0,0"
  488. HorizontalAlignment="Left"
  489. Visibility="{Binding TradeViewModel.IsLotMaxVsb,
  490. 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}" />
  491. </TextBlock>
  492. </StackPanel>
  493. <!-- end数量 -->
  494. <StackPanel Grid.Row="7"
  495. Grid.Column="1"
  496. Height="33"
  497. Orientation="Horizontal"
  498. Visibility="{Binding TradeViewModel.IsAllowPipsVsb,
  499. Converter={StaticResource BooleanToVisibilityConverter}}">
  500. <TextBlock Margin="20,0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Permit_Range}" />
  501. <controls:DecimalNumBox Width="150"
  502. HorizontalAlignment="Left"
  503. VerticalAlignment="Center"
  504. FormatString="F0"
  505. Minimum="0"
  506. Style="{DynamicResource DecimalNewUpDownStyle}"
  507. TabIndex="8"
  508. Text="{Binding TradeViewModel.Pips,
  509. Mode=TwoWay,
  510. UpdateSourceTrigger=PropertyChanged}" />
  511. </StackPanel>
  512. <StackPanel Grid.Row="9"
  513. Grid.Column="1"
  514. Height="33"
  515. VerticalAlignment="Center"
  516. Orientation="Horizontal"
  517. Visibility="Collapsed">
  518. <!-- 不显示有效期 -->
  519. <RadioButton Margin="20,0"
  520. VerticalAlignment="Center"
  521. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_ExpirationType_Today}"
  522. IsChecked="{Binding TradeViewModel.CurrentExpirationType,
  523. ConverterParameter=0,
  524. Converter={StaticResource EnumBooleanConvert}}"
  525. Style="{DynamicResource RadioButtonStyle}" />
  526. <RadioButton Margin="20,0"
  527. VerticalAlignment="Center"
  528. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_ExpirationType_Week}"
  529. IsChecked="{Binding TradeViewModel.CurrentExpirationType,
  530. ConverterParameter=1,
  531. Converter={StaticResource EnumBooleanConvert}}"
  532. Style="{DynamicResource RadioButtonStyle}"
  533. Visibility="Hidden" />
  534. </StackPanel>
  535. <!-- 止盈 -->
  536. <Grid Grid.Row="10"
  537. Grid.Column="0"
  538. Grid.ColumnSpan="3"
  539. Width="280"
  540. Height="33"
  541. Margin="5,0,0,0"
  542. HorizontalAlignment="Left"
  543. Visibility="{Binding TradeViewModel.IsStopPLVsb,
  544. Converter={StaticResource BooleanToVisibilityConverter}}">
  545. <Grid.ColumnDefinitions>
  546. <ColumnDefinition Width="50" />
  547. <ColumnDefinition Width="Auto" />
  548. <ColumnDefinition Width="Auto" />
  549. </Grid.ColumnDefinitions>
  550. <CheckBox x:Name="ProfitBox"
  551. Width="50"
  552. VerticalAlignment="Center"
  553. Content="{x:Static resources:Client_Resource.Trade_Profit}"
  554. IsChecked="{Binding TradeViewModel.StopProfitChecked,
  555. Mode=TwoWay}"
  556. Style="{DynamicResource mtpCheckBoxStyle}"
  557. TabIndex="9" />
  558. <StackPanel Grid.Column="1" Orientation="Horizontal">
  559. <controls:DecimalNumBox Width="100"
  560. VerticalAlignment="Center"
  561. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  562. FormatString="{Binding TradeViewModel.PriceFormat}"
  563. Increment="{Binding TradeViewModel.PriceMinUnit}"
  564. IsEnabled="{Binding IsChecked,
  565. ElementName=ProfitBox}"
  566. Minimum="{Binding TradeViewModel.PriceMinUnit}"
  567. Style="{DynamicResource DecimalNewUpDownStyle}"
  568. TabIndex="10"
  569. Text="{Binding TradeViewModel.StopProfit,
  570. UpdateSourceTrigger=PropertyChanged}" />
  571. <TextBlock Margin="0,5" FontWeight="Normal"><Run Text="{Binding TradeViewModel.ProfitChar, Mode=OneWay}" /><Run Text="{Binding TradeViewModel.DisplayMaxProfit, Mode=OneWay}" />
  572. </TextBlock>
  573. </StackPanel>
  574. <StackPanel Grid.Column="2"
  575. VerticalAlignment="Center"
  576. Orientation="Horizontal">
  577. <TextBlock Margin="5,0"
  578. FontWeight="Normal"
  579. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Tick}" />
  580. <TextBox Width="50"
  581. VerticalAlignment="Center"
  582. IsReadOnly="True"
  583. Style="{DynamicResource RectangleTextBox}"
  584. Text="{Binding TradeViewModel.StopProfitPips,
  585. Mode=OneWay}" />
  586. </StackPanel>
  587. </Grid>
  588. <!-- 止损 -->
  589. <Grid Grid.Row="11"
  590. Grid.ColumnSpan="3"
  591. Width="280"
  592. Height="33"
  593. Margin="5,0,0,0"
  594. HorizontalAlignment="Left"
  595. Visibility="{Binding TradeViewModel.IsStopPLVsb,
  596. Converter={StaticResource BooleanToVisibilityConverter}}">
  597. <Grid.ColumnDefinitions>
  598. <ColumnDefinition Width="50" />
  599. <ColumnDefinition Width="Auto" />
  600. <ColumnDefinition Width="Auto" />
  601. </Grid.ColumnDefinitions>
  602. <CheckBox x:Name="LossBox"
  603. VerticalAlignment="Center"
  604. Content="{x:Static resources:Client_Resource.Trade_Stop}"
  605. IsChecked="{Binding TradeViewModel.StopLossChecked,
  606. Mode=TwoWay}"
  607. Style="{DynamicResource mtpCheckBoxStyle}"
  608. TabIndex="11" />
  609. <StackPanel Grid.Column="1" Orientation="Horizontal">
  610. <controls:DecimalNumBox Width="100"
  611. VerticalAlignment="Center"
  612. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  613. FormatString="{Binding TradeViewModel.PriceFormat}"
  614. Increment="{Binding TradeViewModel.PriceMinUnit}"
  615. IsEnabled="{Binding IsChecked,
  616. ElementName=LossBox}"
  617. Minimum="{Binding TradeViewModel.PriceMinUnit}"
  618. Style="{DynamicResource DecimalNewUpDownStyle}"
  619. TabIndex="12"
  620. Text="{Binding TradeViewModel.StopLoss,
  621. UpdateSourceTrigger=PropertyChanged}" />
  622. <TextBlock Margin="0,5" FontWeight="Normal"><Run Text="{Binding TradeViewModel.LossChar, Mode=OneWay}" /><Run Text="{Binding TradeViewModel.DisplayMaxLoss, Mode=OneWay}" />
  623. </TextBlock>
  624. </StackPanel>
  625. <StackPanel Grid.Column="2"
  626. VerticalAlignment="Center"
  627. Orientation="Horizontal">
  628. <TextBlock Margin="5,0"
  629. FontWeight="Normal"
  630. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Tick}" />
  631. <TextBox Width="50"
  632. VerticalAlignment="Center"
  633. IsReadOnly="True"
  634. Style="{DynamicResource RectangleTextBox}"
  635. Text="{Binding TradeViewModel.StopLossPips,
  636. Mode=OneWay}" />
  637. </StackPanel>
  638. </Grid>
  639. <Grid Grid.Row="12"
  640. Grid.ColumnSpan="2"
  641. Margin="0,5,0,0"
  642. Visibility="{Binding TradeViewModel.IsOrderOptionVisible,
  643. Converter={StaticResource BooleanToVisibilityConverter}}">
  644. <Grid.RowDefinitions>
  645. <RowDefinition Height="*" />
  646. <RowDefinition Height="Auto" />
  647. </Grid.RowDefinitions>
  648. <StackPanel Grid.Row="1"
  649. Margin="0,15"
  650. HorizontalAlignment="Center"
  651. Orientation="Horizontal">
  652. <!-- 买入 -->
  653. <Border Width="90"
  654. HorizontalAlignment="Left"
  655. VerticalAlignment="Top"
  656. Background="{Binding TradeViewModel.BuyBackGroundBrush}"
  657. BorderBrush="{Binding TradeViewModel.BuyBackGroundBrush}"
  658. CornerRadius="4, 4, 4, 4">
  659. <StackPanel x:Name="BuyCommissions"
  660. Width="90"
  661. Background="Transparent"
  662. IsEnabled="{Binding TradeViewModel.CanUseBuy}"
  663. Orientation="Vertical">
  664. <i:Interaction.Triggers>
  665. <i:EventTrigger EventName="MouseLeftButtonDown">
  666. <i:InvokeCommandAction Command="{Binding TradionOKCommand}" CommandParameter="0" />
  667. </i:EventTrigger>
  668. </i:Interaction.Triggers>
  669. <TextBlock Margin="0, 3, 0, 0"
  670. HorizontalAlignment="Center"
  671. Background="Transparent"
  672. FontWeight="Bold"
  673. Text="{Binding TradeViewModel.ChannelBuyPrice}" />
  674. <Path Width="80"
  675. Height="2"
  676. 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"
  677. Fill="White">
  678. <Path.Effect>
  679. <DropShadowEffect BlurRadius="0"
  680. Direction="-270"
  681. Color="White" />
  682. </Path.Effect>
  683. </Path>
  684. <TextBlock Margin="0, 2, 0, 3"
  685. HorizontalAlignment="Center"
  686. FontSize="16"
  687. FontWeight="Bold"
  688. Text="买入" />
  689. </StackPanel>
  690. </Border>
  691. <!-- 卖出 -->
  692. <Border Width="90"
  693. Margin="50, 0, 0, 0"
  694. HorizontalAlignment="Left"
  695. VerticalAlignment="Top"
  696. Background="{Binding TradeViewModel.SellBackGroundBrush}"
  697. BorderBrush="{Binding TradeViewModel.SellBackGroundBrush}"
  698. CornerRadius="4, 4, 4, 4">
  699. <StackPanel x:Name="SellCommissions"
  700. Width="90"
  701. Background="Transparent"
  702. IsEnabled="{Binding TradeViewModel.CanUseSell}"
  703. Orientation="Vertical">
  704. <i:Interaction.Triggers>
  705. <i:EventTrigger EventName="MouseLeftButtonDown">
  706. <i:InvokeCommandAction Command="{Binding TradionOKCommand}" CommandParameter="1" />
  707. </i:EventTrigger>
  708. </i:Interaction.Triggers>
  709. <TextBlock Margin="0, 3, 0, 0"
  710. HorizontalAlignment="Center"
  711. Background="Transparent"
  712. FontWeight="Bold"
  713. Text="{Binding TradeViewModel.ChannelSellPrice}" />
  714. <Path Width="80"
  715. Height="2"
  716. 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"
  717. Fill="White">
  718. <Path.Effect>
  719. <DropShadowEffect BlurRadius="0"
  720. Direction="-270"
  721. Color="White" />
  722. </Path.Effect>
  723. </Path>
  724. <TextBlock Margin="0, 2, 0, 3"
  725. HorizontalAlignment="Center"
  726. FontSize="16"
  727. FontWeight="Bold"
  728. Text="{x:Static resources:Client_Resource.Content_SellOut}" />
  729. </StackPanel>
  730. </Border>
  731. </StackPanel>
  732. <!-- 改了接口,Command是有问题的 -->
  733. <Button x:Name="btnMouseDown"
  734. Grid.Row="1"
  735. Width="82"
  736. Height="26"
  737. Margin="50,0,0,0"
  738. HorizontalAlignment="Left"
  739. VerticalAlignment="Top"
  740. Command="{Binding TradionOKCommand,
  741. ConverterParameter=2}"
  742. Content="{x:Static resources:Client_Resource.Button_Confirm}"
  743. Focusable="True"
  744. IsEnabled="{Binding OKButtonEnabled}"
  745. Style="{DynamicResource CommonButtonStyle}"
  746. TabIndex="12"
  747. Visibility="Collapsed" />
  748. <!--
  749. IsChecked="{Binding TradeViewModel.IsComplex}" Visibility="{Binding IsOKCommandVbs,
  750. Converter={StaticResource BooleanToVisibilityConverter}}"
  751. -->
  752. <CheckBox x:Name="corderBox"
  753. Grid.Row="1"
  754. Margin="20,5"
  755. HorizontalAlignment="Center"
  756. IsChecked="True"
  757. Style="{DynamicResource OrderCheckBoxStyle}"
  758. TabIndex="13"
  759. Visibility="Collapsed">
  760. <StackPanel>
  761. <TextBlock Text="{x:Static resources:Client_Resource.Order_Common_title}" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BooleanToVisibilityConverter}}" />
  762. <TextBlock Text="{x:Static resources:Client_Resource.Order_Topgrade_title}" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BoolOpposedVisibility}}" />
  763. </StackPanel>
  764. </CheckBox>
  765. <Grid Grid.Row="0" Visibility="{Binding IsChecked, ElementName=corderBox, Converter={StaticResource BooleanToVisibilityConverter}}">
  766. <Grid.RowDefinitions>
  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. <RowDefinition Height="Auto" />
  774. </Grid.RowDefinitions>
  775. <Grid.ColumnDefinitions>
  776. <ColumnDefinition Width="Auto" />
  777. <ColumnDefinition />
  778. </Grid.ColumnDefinitions>
  779. <!-- 下单方式 正常单OR 预埋单 -->
  780. <TextBlock Grid.Row="0"
  781. Text="{x:Static resources:Client_Resource.OrderMethods}"
  782. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  783. Converter={StaticResource BooleanToVisibilityConverter}}" />
  784. <StackPanel Grid.Row="0"
  785. Grid.Column="1"
  786. Height="33"
  787. VerticalAlignment="Center"
  788. Orientation="Horizontal"
  789. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  790. Converter={StaticResource BooleanToVisibilityConverter}}">
  791. <RadioButton x:Name="radioBtn_normalOrder"
  792. Margin="20,0"
  793. Content="{x:Static resources:Client_Resource.NormalOrder}"
  794. IsChecked="{Binding TradeViewModel.OrderFlag,
  795. ConverterParameter=0,
  796. Converter={StaticResource EnumBooleanConvert}}"
  797. Style="{DynamicResource RadioButtonStyle}"
  798. TabIndex="14" />
  799. <RadioButton Margin="20,0"
  800. Content="{x:Static resources:Client_Resource.PreOrder}"
  801. IsChecked="{Binding TradeViewModel.OrderFlag,
  802. ConverterParameter=1,
  803. Converter={StaticResource EnumBooleanConvert}}"
  804. IsEnabled="{Binding TradeViewModel.IsEnableByPrePostOrder}"
  805. Style="{DynamicResource RadioButtonStyle}"
  806. TabIndex="16"
  807. Visibility="{Binding TradeViewModel.IsPrePostVisible,
  808. Converter={StaticResource BooleanToVisibilityConverter}}" />
  809. </StackPanel>
  810. <StackPanel Grid.Row="1"
  811. Grid.Column="0"
  812. Grid.ColumnSpan="2"
  813. Height="33"
  814. VerticalAlignment="Center"
  815. Orientation="Horizontal"
  816. Visibility="{Binding IsChecked,
  817. ElementName=radioBtn_normalOrder,
  818. Converter={StaticResource BoolOpposedVisibility}}">
  819. <TextBlock Text="{x:Static resources:Client_Resource.TriggerPrice}" Visibility="{Binding IsChecked, ElementName=radioBtn_normalOrder, Converter={StaticResource BoolOpposedVisibility}}" />
  820. <ComboBox Width="50"
  821. Margin="20,0,0,0"
  822. HorizontalAlignment="Left"
  823. VerticalAlignment="Center"
  824. DisplayMemberPath="Value"
  825. ItemsSource="{Binding TradeViewModel.DicTriggerType}"
  826. SelectedValue="{Binding TradeViewModel.CurrentTirrgerType}"
  827. SelectedValuePath="Key"
  828. Style="{DynamicResource SimpleComboBoxStyle}"
  829. TabIndex="15"
  830. Visibility="{Binding IsChecked,
  831. ElementName=radioBtn_normalOrder,
  832. Converter={StaticResource BoolOpposedVisibility}}" />
  833. <controls:DecimalNumBox Width="120"
  834. Margin="20,0,0,0"
  835. HorizontalAlignment="Left"
  836. VerticalAlignment="Center"
  837. DecimalCount="{Binding TradeViewModel.DecimalCount}"
  838. FormatString="{Binding TradeViewModel.PriceFormat}"
  839. Increment="{Binding TradeViewModel.PriceMinUnit}"
  840. Minimum="0"
  841. Style="{DynamicResource DecimalNewUpDownStyle}"
  842. TabIndex="17"
  843. Text="{Binding TradeViewModel.TriggerPrice,
  844. Mode=TwoWay,
  845. UpdateSourceTrigger=PropertyChanged}"
  846. Visibility="{Binding IsChecked,
  847. ElementName=radioBtn_normalOrder,
  848. Converter={StaticResource BoolOpposedVisibility}}" />
  849. </StackPanel>
  850. <!-- 杠杆 -->
  851. <TextBlock Grid.Row="2"
  852. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lever}"
  853. Visibility="Collapsed" />
  854. <StackPanel Grid.Row="2"
  855. Grid.Column="1"
  856. VerticalAlignment="Center"
  857. Orientation="Horizontal"
  858. Visibility="Collapsed">
  859. <RadioButton Margin="20,0"
  860. Content="10倍"
  861. IsChecked="{Binding TradeViewModel.MarginRate,
  862. ConverterParameter=1,
  863. Converter={StaticResource EnumBooleanConvert}}"
  864. Style="{DynamicResource RadioButtonStyle}"
  865. TabIndex="18" />
  866. <RadioButton Margin="20,0"
  867. Content="20倍"
  868. IsChecked="{Binding TradeViewModel.MarginRate,
  869. ConverterParameter=2,
  870. Converter={StaticResource EnumBooleanConvert}}"
  871. Style="{DynamicResource RadioButtonStyle}"
  872. TabIndex="19" />
  873. <RadioButton Margin="20,0"
  874. Content="40倍"
  875. IsChecked="{Binding TradeViewModel.MarginRate,
  876. ConverterParameter=3,
  877. Converter={StaticResource EnumBooleanConvert}}"
  878. Style="{DynamicResource RadioButtonStyle}"
  879. TabIndex="20" />
  880. </StackPanel>
  881. <!-- 按单/头寸 -->
  882. <Grid Grid.Row="4"
  883. Grid.Column="1"
  884. VerticalAlignment="Center"
  885. Visibility="Collapsed">
  886. <Grid.ColumnDefinitions>
  887. <ColumnDefinition Width="Auto" />
  888. <ColumnDefinition />
  889. </Grid.ColumnDefinitions>
  890. <Grid.RowDefinitions>
  891. <RowDefinition Height="33" />
  892. <RowDefinition Height="Auto" />
  893. </Grid.RowDefinitions>
  894. <RadioButton Margin="20,0,0,0"
  895. VerticalAlignment="Center"
  896. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_NetLot}"
  897. IsChecked="{Binding TradeViewModel.GoodsOrderMode,
  898. ConverterParameter=0,
  899. Converter={StaticResource EnumBooleanConvert}}"
  900. IsEnabled="{Binding TradeViewModel.IsCanGoodsEdit}"
  901. Style="{DynamicResource RadioButtonStyle}"
  902. TabIndex="25" />
  903. <RadioButton x:Name="RadOrder"
  904. Grid.Column="1"
  905. Margin="10,0"
  906. HorizontalAlignment="Left"
  907. VerticalAlignment="Center"
  908. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Bill}"
  909. IsChecked="{Binding TradeViewModel.GoodsOrderMode,
  910. ConverterParameter=1,
  911. Converter={StaticResource EnumBooleanConvert}}"
  912. IsEnabled="{Binding TradeViewModel.IsCanOrderEdit}"
  913. Style="{DynamicResource RadioButtonStyle}"
  914. TabIndex="26" />
  915. <ComboBox Grid.Row="1"
  916. Grid.Column="1"
  917. Width="130"
  918. Margin="0,0,5,0"
  919. HorizontalAlignment="Left"
  920. VerticalAlignment="Center"
  921. DisplayMemberPath="OrderID"
  922. ItemsSource="{Binding TradeViewModel.HoldDetails}"
  923. SelectedItem="{Binding TradeViewModel.SelectOrder}"
  924. Style="{DynamicResource SimpleComboBoxStyle}"
  925. TabIndex="27"
  926. Visibility="{Binding IsChecked,
  927. ElementName=RadOrder,
  928. Converter={StaticResource BooleanToVisibilityConverter}}" />
  929. </Grid>
  930. </Grid>
  931. </Grid>
  932. </Grid>
  933. <!-- OTC报价牌 -->
  934. <Border Grid.Column="0"
  935. Width="150"
  936. Margin="300,5,20,0"
  937. VerticalAlignment="Top"
  938. Background="{DynamicResource OrderPriceBackground}"
  939. BorderBrush="{DynamicResource CommonBorderBrush}"
  940. BorderThickness="1"
  941. CornerRadius="2"
  942. Visibility="{Binding TradeViewModel.IsBidAskVsb,
  943. Converter={StaticResource BooleanToVisibilityConverter}}">
  944. <Grid>
  945. <Grid.RowDefinitions>
  946. <RowDefinition />
  947. <RowDefinition Height="Auto" />
  948. <RowDefinition />
  949. <RowDefinition Height="Auto" />
  950. <RowDefinition />
  951. </Grid.RowDefinitions>
  952. <StackPanel Grid.Row="0"
  953. Height="44"
  954. Orientation="Horizontal">
  955. <TextBlock Margin="8,0,16,0"
  956. FontSize="12"
  957. Text="{x:Static resources:Client_Resource.Trade_Content_PurchasePrice}" />
  958. <border:ExpBorder VerticalAlignment="Center"
  959. BorderThickness="1"
  960. ChangeBrush="{Binding CurrentGoods.BidPriceColor}"
  961. IsBorderThickness="False"
  962. IsVauleChange="{Binding CurrentGoods.IsBidPriceBorder}"
  963. Padding="5,2">
  964. <zoom:ZoomFontText VerticalAlignment="Center"
  965. VerticalContentAlignment="Center"
  966. FontCount="{Binding Figures}"
  967. FontSize="20"
  968. FontWeight="Bold"
  969. Foreground="{Binding CurrentGoods.BidPriceColor}"
  970. Text="{Binding CurrentGoods.BidPriceDisplay}"
  971. ZoomFontSize="16" />
  972. </border:ExpBorder>
  973. </StackPanel>
  974. <Path Grid.Row="1"
  975. Grid.ColumnSpan="3"
  976. Width="140"
  977. Height="3"
  978. VerticalAlignment="Bottom"
  979. 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"
  980. Fill="{DynamicResource OrderBorderBrush}">
  981. <Path.Effect>
  982. <DropShadowEffect BlurRadius="0"
  983. Direction="-270"
  984. Opacity="0.25"
  985. ShadowDepth="1"
  986. Color="{DynamicResource BorderEffect}" />
  987. </Path.Effect>
  988. </Path>
  989. <StackPanel Grid.Row="2"
  990. Height="44"
  991. Orientation="Horizontal">
  992. <TextBlock Margin="8,0,16,0"
  993. FontSize="12"
  994. Text="{x:Static resources:Client_Resource.Trade_Content_SellPrice}" />
  995. <border:ExpBorder VerticalAlignment="Center"
  996. BorderThickness="1"
  997. ChangeBrush="{Binding CurrentGoods.AskPriceColor}"
  998. IsBorderThickness="False"
  999. IsVauleChange="{Binding CurrentGoods.IsAskPriceBorder}"
  1000. Padding="5,2">
  1001. <zoom:ZoomFontText VerticalAlignment="Center"
  1002. VerticalContentAlignment="Center"
  1003. FontCount="{Binding Figures}"
  1004. FontSize="20"
  1005. FontWeight="Bold"
  1006. Foreground="{Binding CurrentGoods.AskPriceColor}"
  1007. Text="{Binding CurrentGoods.AskPriceDisplay}"
  1008. ZoomFontSize="16" />
  1009. </border:ExpBorder>
  1010. </StackPanel>
  1011. </Grid>
  1012. </Border>
  1013. <!-- end OTC报价牌 -->
  1014. <!-- Channel 报价牌 -->
  1015. <Border Grid.Column="0"
  1016. Width="150"
  1017. Margin="300,50,20,0"
  1018. VerticalAlignment="Top"
  1019. Background="{DynamicResource OrderPriceBackground}"
  1020. BorderBrush="{DynamicResource CommonBorderBrush}"
  1021. BorderThickness="1"
  1022. CornerRadius="2"
  1023. Visibility="{Binding ShowBuySellPriceArea,
  1024. Converter={StaticResource BooleanToVisibilityConverter}}">
  1025. <Grid>
  1026. <Grid.RowDefinitions>
  1027. <RowDefinition />
  1028. <RowDefinition Height="Auto" />
  1029. <RowDefinition />
  1030. <RowDefinition Height="Auto" />
  1031. <RowDefinition />
  1032. </Grid.RowDefinitions>
  1033. <StackPanel Grid.Row="0"
  1034. Height="44"
  1035. Orientation="Horizontal">
  1036. <TextBlock Margin="8,0,16,0"
  1037. FontSize="12"
  1038. Text="{x:Static resources:Client_Resource.Trade_Content_PurchasePrice}" />
  1039. <border:ExpBorder VerticalAlignment="Center"
  1040. BorderThickness="1"
  1041. ChangeBrush="{Binding CurrentGoods.BidPriceColor}"
  1042. IsBorderThickness="False"
  1043. IsVauleChange="{Binding CurrentGoods.IsBidPriceBorder}"
  1044. Padding="5,2">
  1045. <zoom:ZoomFontText VerticalAlignment="Center"
  1046. VerticalContentAlignment="Center"
  1047. FontCount="{Binding Figures}"
  1048. FontSize="20"
  1049. FontWeight="Bold"
  1050. Foreground="{Binding CurrentGoods.BidPriceColor}"
  1051. Text="{Binding CurrentGoods.BidPriceDisplay}"
  1052. ZoomFontSize="16" />
  1053. </border:ExpBorder>
  1054. </StackPanel>
  1055. <Path Grid.Row="1"
  1056. Grid.ColumnSpan="3"
  1057. Width="140"
  1058. Height="3"
  1059. VerticalAlignment="Bottom"
  1060. 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"
  1061. Fill="{DynamicResource OrderBorderBrush}">
  1062. <Path.Effect>
  1063. <DropShadowEffect BlurRadius="0"
  1064. Direction="-270"
  1065. Opacity="0.25"
  1066. ShadowDepth="1"
  1067. Color="{DynamicResource BorderEffect}" />
  1068. </Path.Effect>
  1069. </Path>
  1070. <StackPanel Grid.Row="2"
  1071. Height="44"
  1072. Orientation="Horizontal">
  1073. <TextBlock Margin="8,0,16,0"
  1074. FontSize="12"
  1075. Text="{x:Static resources:Client_Resource.Trade_Content_SellPrice}" />
  1076. <border:ExpBorder VerticalAlignment="Center"
  1077. BorderThickness="1"
  1078. ChangeBrush="{Binding CurrentGoods.AskPriceColor}"
  1079. IsBorderThickness="False"
  1080. IsVauleChange="{Binding CurrentGoods.IsAskPriceBorder}"
  1081. Padding="5,2">
  1082. <zoom:ZoomFontText VerticalAlignment="Center"
  1083. VerticalContentAlignment="Center"
  1084. FontCount="{Binding Figures}"
  1085. FontSize="20"
  1086. FontWeight="Bold"
  1087. Foreground="{Binding CurrentGoods.AskPriceColor}"
  1088. Text="{Binding CurrentGoods.AskPriceDisplay}"
  1089. ZoomFontSize="16" />
  1090. </border:ExpBorder>
  1091. </StackPanel>
  1092. </Grid>
  1093. </Border>
  1094. <!-- end Channel报价牌 -->
  1095. <Border x:Name="Bor_CommissionsHeight"
  1096. Width="230"
  1097. Height="280"
  1098. Margin="285,1,5,0"
  1099. HorizontalAlignment="Right"
  1100. VerticalAlignment="Top"
  1101. BorderBrush="{DynamicResource CommonBorderBrush}"
  1102. BorderThickness="1"
  1103. Visibility="{Binding TradeViewModel.IsBidQueueVsb,
  1104. Converter={StaticResource BooleanToVisibilityConverter}}">
  1105. <Grid>
  1106. <Grid.RowDefinitions>
  1107. <RowDefinition Height="Auto" />
  1108. <RowDefinition />
  1109. <RowDefinition Height="Auto" />
  1110. <RowDefinition />
  1111. <RowDefinition Height="Auto" />
  1112. <RowDefinition Height="Auto" />
  1113. </Grid.RowDefinitions>
  1114. <Grid.ColumnDefinitions>
  1115. <ColumnDefinition Width="40" />
  1116. <ColumnDefinition Width="1.5*" />
  1117. <ColumnDefinition Width="*" />
  1118. </Grid.ColumnDefinitions>
  1119. <TextBlock Grid.Column="1"
  1120. Margin="5,3"
  1121. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Price}" />
  1122. <TextBlock Grid.Column="2"
  1123. Margin="5,1"
  1124. Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lot}" />
  1125. <Border Grid.Row="1"
  1126. Grid.RowSpan="3"
  1127. Grid.ColumnSpan="3"
  1128. Background="{DynamicResource OrderPriceBackground}"
  1129. BorderBrush="{DynamicResource CommonBorderBrush}"
  1130. BorderThickness="0,1" />
  1131. <ListBox x:Name="AskCommissionsListBox"
  1132. Grid.Row="1"
  1133. Grid.ColumnSpan="3"
  1134. VerticalAlignment="Bottom"
  1135. Background="Transparent"
  1136. BorderBrush="Transparent"
  1137. FontSize="13"
  1138. IsTabStop="False"
  1139. ItemContainerStyle="{DynamicResource BidPriceListBoxItem}"
  1140. ItemTemplate="{DynamicResource AskDataTemplate}"
  1141. ItemsSource="{Binding TradeViewModel.AskCommissions}"
  1142. MouseLeave="AskCommissionsListBox_MouseLeave"
  1143. SelectedItem="{Binding TradeViewModel.CurrentCommission}"
  1144. Style="{DynamicResource BidPriceListBox}">
  1145. <i:Interaction.Triggers>
  1146. <i:EventTrigger EventName="MouseLeftButtonDown">
  1147. <i:InvokeCommandAction Command="{Binding TradeViewModel.CommissionsListBoxCommand}" CommandParameter="{Binding SelectedItem, ElementName=AskCommissionsListBox}" />
  1148. </i:EventTrigger>
  1149. </i:Interaction.Triggers>
  1150. </ListBox>
  1151. <Path Grid.Row="2"
  1152. Grid.ColumnSpan="3"
  1153. Width="170"
  1154. Height="3"
  1155. VerticalAlignment="Bottom"
  1156. 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"
  1157. Fill="{DynamicResource OrderBorderBrush}">
  1158. <Path.Effect>
  1159. <DropShadowEffect BlurRadius="0"
  1160. Direction="-270"
  1161. Opacity="0.25"
  1162. ShadowDepth="1"
  1163. Color="{DynamicResource BorderEffect}" />
  1164. </Path.Effect>
  1165. </Path>
  1166. <ListBox x:Name="BidCommissionsListBox"
  1167. Grid.Row="3"
  1168. Grid.ColumnSpan="3"
  1169. VerticalAlignment="Top"
  1170. Background="Transparent"
  1171. BorderBrush="Transparent"
  1172. FontSize="13"
  1173. IsTabStop="False"
  1174. ItemContainerStyle="{DynamicResource BidPriceListBoxItem}"
  1175. ItemTemplate="{DynamicResource BidDataTemplate}"
  1176. ItemsSource="{Binding TradeViewModel.BidCommissions}"
  1177. MouseLeave="BidCommissionsListBox_MouseLeave"
  1178. SelectedItem="{Binding TradeViewModel.CurrentCommission}"
  1179. Style="{DynamicResource BidPriceListBox}">
  1180. <i:Interaction.Triggers>
  1181. <i:EventTrigger EventName="MouseLeftButtonDown">
  1182. <i:InvokeCommandAction Command="{Binding TradeViewModel.CommissionsListBoxCommand}" CommandParameter="{Binding SelectedItem, ElementName=BidCommissionsListBox}" />
  1183. </i:EventTrigger>
  1184. </i:Interaction.Triggers>
  1185. </ListBox>
  1186. <Grid Grid.Row="4" Grid.ColumnSpan="3">
  1187. <Grid.RowDefinitions>
  1188. <RowDefinition />
  1189. <RowDefinition Height="1" />
  1190. <RowDefinition />
  1191. </Grid.RowDefinitions>
  1192. <Grid.ColumnDefinitions>
  1193. <ColumnDefinition />
  1194. <ColumnDefinition Width="3" />
  1195. <ColumnDefinition />
  1196. </Grid.ColumnDefinitions>
  1197. <TextBlock Margin="4,4"
  1198. HorizontalAlignment="Left"
  1199. Text="{x:Static resources:Client_Resource.Trade_CurrentPrice}" />
  1200. <TextBlock Width="60"
  1201. HorizontalAlignment="Right"
  1202. Foreground="{Binding CurrentGoods.CurrentPriceColor}"
  1203. MouseDown="UIElement_OnMouseDown"
  1204. Tag="{Binding CurrentGoods.CurrentPrice}"
  1205. Text="{Binding CurrentGoods.CurrentPrice,
  1206. Mode=OneWay}"
  1207. TextTrimming="CharacterEllipsis"
  1208. TextWrapping="NoWrap">
  1209. <TextBlock.ToolTip>
  1210. <StackPanel>
  1211. <TextBlock>
  1212. <Run Foreground="Black" Text="{Binding CurrentGoods.CurrentPrice, Mode=OneWay}" />
  1213. </TextBlock>
  1214. </StackPanel>
  1215. </TextBlock.ToolTip>
  1216. </TextBlock>
  1217. <TextBlock Grid.Column="2"
  1218. HorizontalAlignment="Left"
  1219. Text="{x:Static resources:Client_Resource.Trade_BidIncrement_Title}"
  1220. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1221. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1222. <TextBlock Grid.Column="2"
  1223. Width="60"
  1224. HorizontalAlignment="Right"
  1225. Foreground="{DynamicResource QuoteAscBrush}"
  1226. MouseDown="UIElement_OnMouseDown"
  1227. Tag="{Binding TradeViewModel.UpPrice}"
  1228. Text="{Binding TradeViewModel.UpPriceDisplay,
  1229. Mode=OneWay}"
  1230. TextTrimming="CharacterEllipsis"
  1231. TextWrapping="NoWrap"
  1232. ToolTip="{Binding TradeViewModel.UpPriceDisplay,
  1233. Mode=OneWay}"
  1234. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1235. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1236. <TextBlock Grid.Row="2"
  1237. Margin="4,4"
  1238. HorizontalAlignment="Left"
  1239. Text="{x:Static resources:Client_Resource.Trade_Last}" />
  1240. <TextBlock Grid.Row="2"
  1241. Width="60"
  1242. HorizontalAlignment="Right"
  1243. MouseDown="UIElement_OnMouseDown"
  1244. Tag="{Binding CurrentGoods.LastClose,
  1245. Mode=OneWay}"
  1246. Text="{Binding CurrentGoods.LastClose,
  1247. Mode=OneWay}"
  1248. TextTrimming="CharacterEllipsis"
  1249. TextWrapping="NoWrap">
  1250. <TextBlock.ToolTip>
  1251. <StackPanel>
  1252. <TextBlock>
  1253. <Run Foreground="Black" Text="{Binding CurrentGoods.LastClose, Mode=OneWay}" />
  1254. </TextBlock>
  1255. </StackPanel>
  1256. </TextBlock.ToolTip>
  1257. </TextBlock>
  1258. <TextBlock Grid.Row="2"
  1259. Grid.Column="2"
  1260. HorizontalAlignment="Left"
  1261. Text="{x:Static resources:Client_Resource.Trade_BidBlow_Title}"
  1262. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1263. Converter={StaticResource BooleanToVisibilityConverter}}" />
  1264. <TextBlock Grid.Row="2"
  1265. Grid.Column="2"
  1266. Width="60"
  1267. HorizontalAlignment="Right"
  1268. Foreground="{DynamicResource QuoteDecBrush}"
  1269. MouseDown="UIElement_OnMouseDown"
  1270. Tag="{Binding TradeViewModel.LowPrice,
  1271. Mode=OneWay}"
  1272. Text="{Binding TradeViewModel.LowPriceDisplay,
  1273. Mode=OneWay}"
  1274. TextTrimming="CharacterEllipsis"
  1275. TextWrapping="NoWrap"
  1276. Visibility="{Binding TradeViewModel.IsShowRaiseFall,
  1277. Converter={StaticResource BooleanToVisibilityConverter}}">
  1278. <TextBlock.ToolTip>
  1279. <StackPanel>
  1280. <TextBlock>
  1281. <Run Foreground="Black" Text="{Binding TradeViewModel.LowPriceDisplay, Mode=OneWay}" />
  1282. </TextBlock>
  1283. </StackPanel>
  1284. </TextBlock.ToolTip>
  1285. </TextBlock>
  1286. </Grid>
  1287. </Grid>
  1288. </Border>
  1289. </Grid>
  1290. </UserControl>