ChartPane.xaml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <UserControl x:Class="MuchInfo.Chart.WPF.ChartPane"
  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. <Grid x:Name="LayoutRoot">
  7. <Grid.RowDefinitions>
  8. <RowDefinition Height="Auto" />
  9. <RowDefinition Height="*" />
  10. </Grid.RowDefinitions>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition x:Name="colLeft" Width="Auto" />
  13. <ColumnDefinition Width="*" />
  14. </Grid.ColumnDefinitions>
  15. <StackPanel x:Name="Legend"
  16. Grid.Column="1"
  17. Margin="5,0,0,0"
  18. Orientation="Horizontal">
  19. <Border x:Name="btnMore"
  20. Grid.Column="2"
  21. Width="47"
  22. Margin="1,1,1,1"
  23. VerticalAlignment="Bottom"
  24. Background="Transparent"
  25. BorderBrush="Gray"
  26. BorderThickness="1"
  27. CornerRadius="2"
  28. MouseEnter="btnMore_MouseEnter"
  29. MouseLeave="btnMore_MouseLeave"
  30. MouseLeftButtonDown="btnMore_MouseLeftButtonDown"
  31. Padding="3,0,3,0"
  32. Visibility="Collapsed">
  33. <StackPanel Orientation="Horizontal">
  34. <TextBlock Margin="0,-2,3,-2"
  35. VerticalAlignment="Center"
  36. Foreground="Gray"
  37. Text="More" />
  38. <Path x:Name="pathDropArrow"
  39. VerticalAlignment="Center"
  40. Fill="Gray">
  41. <Path.Data>
  42. <PathGeometry>
  43. <PathGeometry.Figures>
  44. <PathFigureCollection>
  45. <PathFigure StartPoint="0,0">
  46. <PathFigure.Segments>
  47. <LineSegment Point="8,0" />
  48. <LineSegment Point="4,5" />
  49. <LineSegment Point="0,0" />
  50. </PathFigure.Segments>
  51. </PathFigure>
  52. </PathFigureCollection>
  53. </PathGeometry.Figures>
  54. </PathGeometry>
  55. </Path.Data>
  56. </Path>
  57. </StackPanel>
  58. </Border>
  59. </StackPanel>
  60. <Border x:Name="btnRemovePane"
  61. Margin="3,1,3,2"
  62. BorderBrush="gray"
  63. BorderThickness="1"
  64. CornerRadius="2"
  65. MouseEnter="btnRemovePane_MouseEnter"
  66. MouseLeave="btnRemovePane_MouseLeave"
  67. MouseLeftButtonDown="btnRemovePane_MouseLeftButtonDown"
  68. MouseLeftButtonUp="btnRemovePane_MouseLeftButtonUp">
  69. <TextBlock x:Name="txtRemovePane"
  70. Margin="3,0,3,-1"
  71. VerticalAlignment="Center"
  72. FontSize="11"
  73. FontWeight="Bold"
  74. Foreground="Gray"
  75. Text="X" />
  76. </Border>
  77. <Canvas x:Name="PaintArea"
  78. Grid.Row="1"
  79. Grid.ColumnSpan="2"
  80. ClipToBounds="True"
  81. LostMouseCapture="PaintArea_LostMouseCapture"
  82. MouseEnter="PaintArea_MouseEnter"
  83. MouseLeave="PaintArea_MouseLeave"
  84. MouseLeftButtonDown="PaintArea_MouseLeftButtonDown"
  85. MouseLeftButtonUp="PaintArea_MouseLeftButtonUp"
  86. MouseMove="PaintArea_MouseMove"
  87. SizeChanged="PaintArea_SizeChanged" />
  88. </Grid>
  89. </UserControl>