DraggableWindowHeader.xaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <UserControl x:Class="MuchInfo.Chart.Infrastructure.Controls.DraggableWindowHeader"
  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. mc:Ignorable="d">
  7. <Border x:Name="borderMain"
  8. BorderBrush="Gray"
  9. BorderThickness="4,4,4,0"
  10. CornerRadius="5,5,0,0">
  11. <Border.Background>
  12. <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
  13. <LinearGradientBrush.GradientStops>
  14. <GradientStop Offset="0" Color="LightSteelBlue" />
  15. <GradientStop Offset="1" Color="#FFCCCCCC" />
  16. <!--
  17. <GradientStop Color="#FF383838" Offset="0"></GradientStop>
  18. <GradientStop Color="#224682B4" Offset=".7"></GradientStop>
  19. <GradientStop Color="#FF555555" Offset="1"></GradientStop>
  20. -->
  21. </LinearGradientBrush.GradientStops>
  22. </LinearGradientBrush>
  23. </Border.Background>
  24. <Grid>
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="auto" />
  27. <ColumnDefinition Width="*" />
  28. <ColumnDefinition Width="auto" />
  29. </Grid.ColumnDefinitions>
  30. <StackPanel Orientation="Horizontal">
  31. <Image x:Name="headerIcon"
  32. Margin="4,0,0,0"
  33. Stretch="None"
  34. Visibility="Collapsed" />
  35. <TextBlock x:Name="txtHeader"
  36. Margin="4,4,4,4"
  37. VerticalAlignment="Center"
  38. Text="Edit TrendLine" />
  39. </StackPanel>
  40. <Border x:Name="borderGrab"
  41. Grid.ColumnSpan="2"
  42. Background="Transparent"
  43. LostMouseCapture="borderGrab_LostMouseCapture"
  44. MouseLeftButtonDown="borderGrab_MouseLeftButtonDown"
  45. MouseLeftButtonUp="borderGrab_MouseLeftButtonUp"
  46. MouseMove="borderGrab_MouseMove" />
  47. <Border x:Name="borderDelete"
  48. Grid.Column="2"
  49. Margin="5,2,1,2"
  50. Background="Transparent"
  51. BorderBrush="#FF333333"
  52. BorderThickness="2"
  53. CornerRadius="4"
  54. MouseEnter="borderDelete_MouseEnter"
  55. MouseLeave="borderDelete_MouseLeave"
  56. MouseLeftButtonDown="borderDelete_MouseLeftButtonDown">
  57. <TextBlock x:Name="txtDelete"
  58. Margin="3,-1,3,-1"
  59. FontSize="13"
  60. FontWeight="Bold"
  61. Foreground="#FF333333"
  62. Text="X" />
  63. </Border>
  64. </Grid>
  65. </Border>
  66. </UserControl>