PrePostDetailView.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <UserControl x:Class="Muchinfo.MTPClient.Account.Views.PrePostDetailView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  6. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  9. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  10. DataContext="{Binding PrePostDetail,
  11. Source={StaticResource Locator}}"
  12. d:DesignHeight="300"
  13. d:DesignWidth="300"
  14. mc:Ignorable="d">
  15. <ScrollViewer x:Name="OutScrollViewer"
  16. HorizontalScrollBarVisibility="Auto"
  17. VerticalScrollBarVisibility="Auto">
  18. <StackPanel>
  19. <Expander IsExpanded="{Binding BidIsExpander}"
  20. Style="{DynamicResource AccountExpanderStyle}"
  21. Visibility="{Binding MarketTypes,
  22. Converter={StaticResource MarketVisibilityConventer},
  23. ConverterParameter=1}">
  24. <Expander.Header>
  25. <StackPanel Orientation="Horizontal">
  26. <TextBlock Text="竞价预埋单" />
  27. <TextBlock>
  28. <Run Text=" (" />
  29. <Run Text="{Binding DicOrderCount[1]}" />
  30. <Run Text=")" />
  31. </TextBlock>
  32. </StackPanel>
  33. </Expander.Header>
  34. <dataGrid:MuchinfoDataGrid x:Name="BidDataGrid"
  35. ItemsSource="{Binding OrderSource[1],
  36. Mode=OneWay}"
  37. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  38. ScrollViewer.VerticalScrollBarVisibility="Auto"
  39. SelectedItem="{Binding CurrentLimitOrder,
  40. Mode=TwoWay}"
  41. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  42. <i:Interaction.Triggers>
  43. <i:EventTrigger EventName="MouseEnter">
  44. <i:InvokeCommandAction Command="{Binding DataGridMouseEnter}" CommandParameter="{Binding SelectedItem, ElementName=BidDataGrid}" />
  45. </i:EventTrigger>
  46. </i:Interaction.Triggers>
  47. <DataGrid.Columns>
  48. <!-- 预埋单号 -->
  49. <DataGridTextColumn Width="Auto"
  50. MinWidth="140"
  51. Binding="{Binding PreOrderId}"
  52. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  53. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_PreOrderId}" />
  54. <!-- 商品 -->
  55. <DataGridTextColumn Width="Auto"
  56. MinWidth="140"
  57. Binding="{Binding goodsname}"
  58. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  59. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_goodsname}" />
  60. <!--
  61. 杠杆
  62. <DataGridTextColumn Width="Auto" MinWidth="130" Binding="{Binding DisplayCloseDate}"
  63. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  64. Header="{x:Static resource:Client_Resource.Content_CloseDate}" />
  65. -->
  66. <!-- 方向 -->
  67. <DataGridTextColumn Width="Auto"
  68. MinWidth="100"
  69. Binding="{Binding BuyOrSellStr}"
  70. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  71. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_BuyOrSell}" />
  72. <!-- 订单类型 -->
  73. <DataGridTextColumn Width="Auto"
  74. MinWidth="100"
  75. Binding="{Binding BuildTypeStr}"
  76. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  77. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_BuildType}" />
  78. <!--
  79. 市价/限价
  80. <DataGridTextColumn Width="Auto" MinWidth="100" Binding="{Binding Lot}"
  81. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  82. Header="{x:Static resource:Client_Resource.Content_Count}" />
  83. -->
  84. <!-- 触发价格 -->
  85. <DataGridTextColumn Width="Auto"
  86. MinWidth="100"
  87. Binding="{Binding TriggerPriceDisplay}"
  88. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  89. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_TriggerPrice}" />
  90. <!-- 委托价格 -->
  91. <DataGridTextColumn Width="Auto"
  92. MinWidth="100"
  93. Binding="{Binding orderpriceDisplay}"
  94. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  95. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_orderprice}" />
  96. <!-- 止盈价格 -->
  97. <!--
  98. <DataGridTextColumn Width="Auto"
  99. MinWidth="140"
  100. Binding="{Binding SpPrice}"
  101. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  102. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_SpPrice}" />
  103. -->
  104. <!-- 止损价格 -->
  105. <!--
  106. <DataGridTextColumn Width="Auto"
  107. MinWidth="140"
  108. Binding="{Binding SlPrice}"
  109. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  110. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_SlPrice}" />
  111. -->
  112. <!-- 委托数量 -->
  113. <DataGridTextColumn Width="Auto"
  114. MinWidth="100"
  115. Binding="{Binding orderqty}"
  116. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  117. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_orderqty}" />
  118. <!-- 有效类型 -->
  119. <DataGridTextColumn Width="Auto"
  120. MinWidth="100"
  121. Binding="{Binding ValidTypeStr}"
  122. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  123. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_ValidType}" />
  124. <!-- 委托时间 -->
  125. <DataGridTextColumn Width="Auto"
  126. MinWidth="120"
  127. Binding="{Binding ClientOrderTime,
  128. StringFormat='yyyy-MM-dd HH:mm:ss'}"
  129. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  130. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_ClientOrderTime}" />
  131. <!-- 预埋状态 -->
  132. <DataGridTextColumn Width="Auto"
  133. MinWidth="100"
  134. Binding="{Binding OrderStatusStr}"
  135. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  136. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_OrderStatus}" />
  137. <!-- 备注 -->
  138. <DataGridTextColumn Width="Auto"
  139. MinWidth="100"
  140. Binding="{Binding Remark}"
  141. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  142. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_Remark}" />
  143. </DataGrid.Columns>
  144. <DataGrid.ContextMenu>
  145. <ContextMenu>
  146. <MenuItem Command="{Binding CancelHoldingCammand}"
  147. Header="{x:Static resource:Client_Resource.Button_Cancellation}"
  148. Style="{DynamicResource CommonMenuItem}" />
  149. <MenuItem Command="{Binding RefreshCommand}"
  150. Header="{x:Static resource:Client_Resource.Button_Refresh}"
  151. IsEnabled="True"
  152. Style="{DynamicResource CommonMenuItem}" />
  153. </ContextMenu>
  154. </DataGrid.ContextMenu>
  155. </dataGrid:MuchinfoDataGrid>
  156. </Expander>
  157. <Expander IsExpanded="{Binding OTCBidIsExpander}"
  158. Style="{DynamicResource AccountExpanderStyle}"
  159. Visibility="{Binding MarketTypes,
  160. Converter={StaticResource MarketVisibilityConventer},
  161. ConverterParameter=3}">
  162. <Expander.Header>
  163. <StackPanel Orientation="Horizontal">
  164. <TextBlock Text="混合预埋单" />
  165. <TextBlock>
  166. <Run Text=" (" />
  167. <Run Text="{Binding DicOrderCount[3]}" />
  168. <Run Text=")" />
  169. </TextBlock>
  170. </StackPanel>
  171. </Expander.Header>
  172. <dataGrid:MuchinfoDataGrid x:Name="otcbidDataGrid"
  173. ItemsSource="{Binding OrderSource[3],
  174. Mode=OneWay}"
  175. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  176. ScrollViewer.VerticalScrollBarVisibility="Auto"
  177. SelectedItem="{Binding CurrentLimitOrder,
  178. Mode=TwoWay}"
  179. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  180. <i:Interaction.Triggers>
  181. <i:EventTrigger EventName="MouseEnter">
  182. <i:InvokeCommandAction Command="{Binding DataGridMouseEnter}" CommandParameter="{Binding SelectedItem, ElementName=otcbidDataGrid}" />
  183. </i:EventTrigger>
  184. </i:Interaction.Triggers>
  185. <DataGrid.Columns>
  186. <!-- 预埋单号 -->
  187. <DataGridTextColumn Width="Auto"
  188. MinWidth="140"
  189. Binding="{Binding PreOrderId}"
  190. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  191. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_PreOrderId}" />
  192. <!-- 商品 -->
  193. <DataGridTextColumn Width="Auto"
  194. MinWidth="140"
  195. Binding="{Binding goodsname}"
  196. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  197. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_goodsname}" />
  198. <!--
  199. 杠杆
  200. <DataGridTextColumn Width="Auto" MinWidth="130" Binding="{Binding DisplayCloseDate}"
  201. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  202. Header="{x:Static resource:Client_Resource.Content_CloseDate}" />
  203. -->
  204. <!-- 方向 -->
  205. <DataGridTextColumn Width="Auto"
  206. MinWidth="100"
  207. Binding="{Binding BuyOrSellStr}"
  208. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  209. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_BuyOrSell}" />
  210. <!-- 订单类型 -->
  211. <DataGridTextColumn Width="Auto"
  212. MinWidth="100"
  213. Binding="{Binding BuildTypeStr}"
  214. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  215. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_BuildType}" />
  216. <!--
  217. 市价/限价
  218. <DataGridTextColumn Width="Auto" MinWidth="100" Binding="{Binding Lot}"
  219. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  220. Header="{x:Static resource:Client_Resource.Content_Count}" />
  221. -->
  222. <!-- 触发价格 -->
  223. <DataGridTextColumn Width="Auto"
  224. MinWidth="100"
  225. Binding="{Binding TriggerPriceDisplay}"
  226. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  227. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_TriggerPrice}" />
  228. <!-- 委托价格 -->
  229. <DataGridTextColumn Width="Auto"
  230. MinWidth="100"
  231. Binding="{Binding Bid_OrderpriceDisplay}"
  232. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  233. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_orderprice}" />
  234. <!-- 止盈价格 -->
  235. <!--
  236. <DataGridTextColumn Width="Auto"
  237. MinWidth="140"
  238. Binding="{Binding SpPrice}"
  239. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  240. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_SpPrice}" />
  241. -->
  242. <!-- 止损价格 -->
  243. <!--
  244. <DataGridTextColumn Width="Auto"
  245. MinWidth="140"
  246. Binding="{Binding SlPrice}"
  247. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  248. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_SlPrice}" />
  249. -->
  250. <!-- 委托数量 -->
  251. <DataGridTextColumn Width="Auto"
  252. MinWidth="100"
  253. Binding="{Binding orderqty}"
  254. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  255. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_orderqty}" />
  256. <!-- 有效类型 -->
  257. <DataGridTextColumn Width="Auto"
  258. MinWidth="100"
  259. Binding="{Binding ValidTypeStr}"
  260. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  261. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_ValidType}" />
  262. <!-- 委托时间 -->
  263. <DataGridTextColumn Width="Auto"
  264. MinWidth="120"
  265. Binding="{Binding ClientOrderTime,
  266. StringFormat='yyyy-MM-dd HH:mm:ss'}"
  267. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  268. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_ClientOrderTime}" />
  269. <!-- 预埋状态 -->
  270. <DataGridTextColumn Width="Auto"
  271. MinWidth="100"
  272. Binding="{Binding OrderStatusStr}"
  273. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  274. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_OrderStatus}" />
  275. <!-- 备注 -->
  276. <DataGridTextColumn Width="Auto"
  277. MinWidth="100"
  278. Binding="{Binding Remark}"
  279. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  280. Header="{x:Static resource:Client_Resource.Content_PrePostDetailView_Remark}" />
  281. </DataGrid.Columns>
  282. <DataGrid.ContextMenu>
  283. <ContextMenu>
  284. <MenuItem Command="{Binding CancelHoldingCammand}"
  285. Header="{x:Static resource:Client_Resource.Button_Cancellation}"
  286. Style="{DynamicResource CommonMenuItem}" />
  287. <MenuItem Command="{Binding RefreshCommand}"
  288. Header="{x:Static resource:Client_Resource.Button_Refresh}"
  289. IsEnabled="True"
  290. Style="{DynamicResource CommonMenuItem}" />
  291. </ContextMenu>
  292. </DataGrid.ContextMenu>
  293. </dataGrid:MuchinfoDataGrid>
  294. </Expander>
  295. </StackPanel>
  296. </ScrollViewer>
  297. </UserControl>