CChartView.xaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <UserControl x:Class="Muchinfo.MTPClient.Analysis.Views.CChartView"
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:priceCard="clr-namespace:Muchinfo.MTPClient.Analysis.Views.PriceCard"
  7. Loaded="CChartView_OnLoaded"
  8. Unloaded="CChartView_OnUnloaded"
  9. mc:Ignorable="d">
  10. <UserControl.Resources>
  11. <DataTemplate x:Key="CycleTemplate">
  12. <TextBlock Text="{Binding Title}" />
  13. </DataTemplate>
  14. <BooleanToVisibilityConverter x:Key="ToVisibilityConverter" />
  15. </UserControl.Resources>
  16. <UserControl.InputBindings>
  17. <KeyBinding Key="Enter"
  18. Command="{Binding EnterCommand}"
  19. CommandParameter="6" />
  20. <KeyBinding Key="Add"
  21. Command="{Binding EnterCommand}"
  22. CommandParameter="20" />
  23. <KeyBinding Key="Subtract"
  24. Command="{Binding EnterCommand}"
  25. CommandParameter="19" />
  26. <KeyBinding Key="F5"
  27. Command="{Binding EnterCommand}"
  28. CommandParameter="94" />
  29. </UserControl.InputBindings>
  30. <Grid x:Name="RootGrid" Background="{DynamicResource CommonBackgroundBrush}">
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition Width="*" />
  33. <ColumnDefinition Width="Auto" />
  34. </Grid.ColumnDefinitions>
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="*" />
  37. <RowDefinition Height="Auto" />
  38. </Grid.RowDefinitions>
  39. <Border Background="{DynamicResource WindowHeadBrush}"
  40. BorderBrush="{DynamicResource CommonBorderBrush}"
  41. BorderThickness="1">
  42. <WindowsFormsHost x:Name="FormsHost"
  43. KeyUp="FormsHost_OnKeyUp"
  44. Loaded="FormsHost_OnLoaded" />
  45. </Border>
  46. <Border Grid.Row="1"
  47. Background="{DynamicResource WindowHeadBrush}"
  48. BorderBrush="{DynamicResource CommonBorderBrush}"
  49. BorderThickness="1">
  50. <ListBox IsEnabled="{Binding IsIndecatorEnable}"
  51. ItemContainerStyle="{DynamicResource ChartIndecatorListBoxItemStyle}"
  52. ItemTemplate="{DynamicResource CycleTemplate}"
  53. ItemsSource="{Binding CommandTypes}"
  54. SelectedItem="{Binding CurrentIndexMenu}"
  55. SelectionMode="Single"
  56. Style="{DynamicResource ChartCycleListBoxStyle}">
  57. <ListBox.ItemsPanel>
  58. <ItemsPanelTemplate>
  59. <StackPanel Orientation="Horizontal" />
  60. </ItemsPanelTemplate>
  61. </ListBox.ItemsPanel>
  62. </ListBox>
  63. </Border>
  64. <Grid Grid.RowSpan="2"
  65. Grid.Column="1"
  66. VerticalAlignment="Stretch"
  67. Visibility="{Binding IsPriceBoard,
  68. Converter={StaticResource ToVisibilityConverter}}">
  69. <priceCard:QuotePriceView x:Name="TabPriceView" DataContext="{Binding PriceViewModel}" />
  70. </Grid>
  71. </Grid>
  72. </UserControl>