File size: 4,098 Bytes
68dd90e 2931426 68dd90e 2931426 b355108 68dd90e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
<Window
x:Class="ScreenGrab.ScreenGrabView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ScreenGrab"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="ScreenGrab"
Width="800"
Height="450"
AllowsTransparency="True"
Background="Transparent"
Closed="Window_Closed"
Loaded="Window_Loaded"
ResizeMode="NoResize"
ShowInTaskbar="False"
Topmost="True"
Unloaded="Window_Unloaded"
WindowStyle="None"
mc:Ignorable="d">
<Grid d:Background="NavajoWhite">
<Viewbox>
<Image x:Name="BackgroundImage" Stretch="UniformToFill" />
</Viewbox>
<Canvas
x:Name="RegionClickCanvas"
Cursor="Cross"
MouseDown="RegionClickCanvas_MouseDown"
MouseEnter="RegionClickCanvas_MouseEnter"
MouseLeave="RegionClickCanvas_MouseLeave"
MouseMove="RegionClickCanvas_MouseMove"
MouseUp="RegionClickCanvas_MouseUp">
<Canvas.Clip>
<CombinedGeometry GeometryCombineMode="Exclude">
<CombinedGeometry.Geometry1>
<RectangleGeometry x:Name="FullWindow" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<RectangleGeometry x:Name="ClippingGeometry" />
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Canvas.Clip>
<Canvas.Background>
<SolidColorBrush
x:Name="BackgroundBrush"
Opacity="0"
Color="#FF202020" />
</Canvas.Background>
<!-- Horizontal Line -->
<Line
x:Name="HorizontalLine"
Stroke="#92caf4"
StrokeThickness="1"
Visibility="Collapsed" />
<!-- Vertical Line -->
<Line
x:Name="VerticalLine"
Stroke="#92caf4"
StrokeThickness="1"
Visibility="Collapsed" />
</Canvas>
<Border
x:Name="PromptMsg"
Margin="15"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Background="#424242"
BorderBrush="WhiteSmoke"
BorderThickness=".6"
Opacity="0.9"
Visibility="Collapsed">
<local:AutoGrid
ChildMargin="3"
ChildVerticalAlignment="Center"
Columns="*, *"
RowCount="3"
RowHeight="30">
<Grid.Resources>
<Style TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="16" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</Grid.Resources>
<StackPanel>
<local:UcCharacter DisplayChar="Shift" />
<local:UcCharacter DisplayChar="🖱" />
</StackPanel>
<TextBlock Text="移动选区" />
<StackPanel>
<local:UcCharacter DisplayChar="F" />
</StackPanel>
<TextBlock x:Name="FreezeTb" Text="取消冻结窗口" />
<StackPanel>
<local:UcCharacter DisplayChar="O" />
</StackPanel>
<TextBlock x:Name="OCRTYPE" Text="文字识别" />
</local:AutoGrid>
</Border>
</Grid>
</Window> |