星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

JieTuWindow.xaml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <Window
  2. x:Class="ComeCapture.JieTuWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:ctrl="clr-namespace:ComeCapture.Controls"
  6. Title="MainWindow"
  7. Closed="Window_Closed"
  8. Cursor="Cross"
  9. FontFamily="Microsoft YaHei"
  10. KeyDown="Window_KeyDown"
  11. MouseLeftButtonDown="Window_MouseLeftButtonDown"
  12. MouseLeftButtonUp="Window_MouseLeftButtonUp"
  13. MouseMove="Window_MouseMove"
  14. ResizeMode="NoResize"
  15. ShowInTaskbar="False"
  16. Topmost="True"
  17. WindowState="Maximized"
  18. WindowStyle="None">
  19. <Window.Template>
  20. <ControlTemplate TargetType="Window">
  21. <Border
  22. Margin="0"
  23. Padding="0"
  24. Background="{TemplateBinding Background}">
  25. <ContentControl Content="{TemplateBinding Content}" />
  26. </Border>
  27. </ControlTemplate>
  28. </Window.Template>
  29. <Grid>
  30. <Canvas
  31. x:Name="MainCanvas"
  32. Margin="0,0"
  33. Background="Transparent">
  34. <!-- 遮罩 -->
  35. <Canvas
  36. x:Name="MaskLeft"
  37. Canvas.Left="0"
  38. Canvas.Top="0"
  39. Width="{Binding MaskLeftWidth}"
  40. Background="Black"
  41. Opacity="0.5" />
  42. <Canvas
  43. x:Name="MaskRight"
  44. Canvas.Top="0"
  45. Canvas.Right="0"
  46. Width="{Binding MaskRightWidth}"
  47. Background="Black"
  48. Opacity="0.5" />
  49. <Canvas
  50. x:Name="MaskTop"
  51. Canvas.Left="{Binding ElementName=MaskLeft, Path=Width}"
  52. Canvas.Top="0"
  53. Width="{Binding MaskTopWidth}"
  54. Height="{Binding MaskTopHeight}"
  55. Background="Black"
  56. Opacity="0.5" />
  57. <Canvas
  58. x:Name="MaskBottom"
  59. Canvas.Left="{Binding ElementName=MaskLeft, Path=Width}"
  60. Canvas.Bottom="0"
  61. Width="{Binding ElementName=MaskTop, Path=Width}"
  62. Height="{Binding MaskBottomHeight}"
  63. Background="Black"
  64. Opacity="0.5" />
  65. <!-- 尺寸和RGB -->
  66. <StackPanel
  67. x:Name="SizeRgb"
  68. Canvas.Left="{Binding ShowSizeLeft}"
  69. Canvas.Top="{Binding ShowSizeTop}"
  70. Width="200"
  71. Background="Black"
  72. Opacity="0.7">
  73. <TextBlock
  74. x:Name="ShowSize"
  75. Height="20"
  76. Padding="10,4,10,0"
  77. FontSize="12"
  78. Foreground="White"
  79. Text="{Binding ShowSize}"
  80. TextAlignment="Left"
  81. Visibility="Collapsed" />
  82. <TextBlock
  83. x:Name="ShowRgb"
  84. Height="20"
  85. Padding="10,1,10,0"
  86. FontSize="12"
  87. Foreground="White"
  88. Text="{Binding ShowRGB}"
  89. TextAlignment="Left"
  90. Visibility="Collapsed" />
  91. </StackPanel>
  92. <ctrl:MainImage x:Name="MainImage" />
  93. <ctrl:ImageEditBar x:Name="ImageEditBar" />
  94. <ctrl:SizeColorBar x:Name="SizeColorBar" />
  95. </Canvas>
  96. </Grid>
  97. </Window>