<Window
    x:Class="ComeCapture.JieTuWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ctrl="clr-namespace:ComeCapture.Controls"
    xmlns:local="clr-namespace:ComeCapture"
    Title="MainWindow"
    Closed="Window_Closed"
    Cursor="Cross"
    FontFamily="Microsoft YaHei"
    KeyDown="Window_KeyDown"
    MouseLeftButtonDown="Window_MouseLeftButtonDown"
    MouseLeftButtonUp="Window_MouseLeftButtonUp"
    MouseMove="Window_MouseMove"
    ResizeMode="NoResize"
    ShowInTaskbar="False"
    Topmost="True"
    WindowState="Maximized"
    WindowStyle="None">
    <Window.Template>
        <ControlTemplate TargetType="Window">
            <Border
                Margin="0"
                Padding="0"
                Background="{TemplateBinding Background}">
                <ContentControl Content="{TemplateBinding Content}" />
            </Border>
        </ControlTemplate>
    </Window.Template>
    <Grid>
        <Canvas
            x:Name="MainCanvas"
            Margin="0,0"
            Background="Transparent">
            <!--  遮罩  -->
            <Canvas
                x:Name="MaskLeft"
                Canvas.Left="0"
                Canvas.Top="0"
                Width="{Binding MaskLeftWidth}"
                Background="Black"
                Opacity="0.5" />
            <Canvas
                x:Name="MaskRight"
                Canvas.Top="0"
                Canvas.Right="0"
                Width="{Binding MaskRightWidth}"
                Background="Black"
                Opacity="0.5" />
            <Canvas
                x:Name="MaskTop"
                Canvas.Left="{Binding ElementName=MaskLeft, Path=Width}"
                Canvas.Top="0"
                Width="{Binding MaskTopWidth}"
                Height="{Binding MaskTopHeight}"
                Background="Black"
                Opacity="0.5" />
            <Canvas
                x:Name="MaskBottom"
                Canvas.Left="{Binding ElementName=MaskLeft, Path=Width}"
                Canvas.Bottom="0"
                Width="{Binding ElementName=MaskTop, Path=Width}"
                Height="{Binding MaskBottomHeight}"
                Background="Black"
                Opacity="0.5" />

            <!--  尺寸和RGB  -->
            <StackPanel
                x:Name="SizeRGB"
                Canvas.Left="{Binding ShowSizeLeft}"
                Canvas.Top="{Binding ShowSizeTop}"
                Width="200"
                Background="Black"
                Opacity="0.7">
                <TextBlock
                    x:Name="Show_Size"
                    Height="20"
                    Padding="10,4,10,0"
                    FontSize="12"
                    Foreground="White"
                    Text="{Binding ShowSize}"
                    TextAlignment="Left"
                    Visibility="Collapsed" />
                <TextBlock
                    x:Name="Show_RGB"
                    Height="20"
                    Padding="10,1,10,0"
                    FontSize="12"
                    Foreground="White"
                    Text="{Binding ShowRGB}"
                    TextAlignment="Left"
                    Visibility="Collapsed" />
            </StackPanel>

            <ctrl:MainImage x:Name="MainImage" />
            <ctrl:ImageEditBar x:Name="ImageEditBar" />
            <ctrl:SizeColorBar x:Name="SizeColorBar" />
        </Canvas>
    </Grid>
</Window>