<UserControl x:Class="AIRS.Picturebox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:AIRS"
             mc:Ignorable="d" 
             d:DesignHeight="340" d:DesignWidth="420" Width="420" Height="340" MinHeight="34" MinWidth="42">
    <Grid>
        <Viewbox Stretch="Fill">
            <ScrollViewer HorizontalScrollBarVisibility="Hidden"  VerticalScrollBarVisibility="Hidden" Width="420" Height="340">
                <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="315" VerticalAlignment="Top" Width="420" Background="#FFE0DDDD">
                    <Canvas x:Name="cantest" Width="420" Height="315" MouseDown="cantest_MouseDown" MouseMove="cantest_MouseMove" MouseUp="cantest_MouseUp" MouseLeave="cantest_MouseLeave" >
                        <Image x:Name="img" Canvas.Left="0" Canvas.Top="0" Width="420" Height="315">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="sfr" />
                                    <TranslateTransform/>
                                    <ScaleTransform/>
                                    <RotateTransform/>
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                        <Path x:Name="field" Fill="#40FF0000" Visibility="Hidden">
                            <Path.Data>
                                <GeometryGroup>
                                    <!--Center为圆心的坐标，RadiusX、RadiusY分别为X、Y两轴的半径-->
                                    <RectangleGeometry x:Name="rect" Rect="0,0,420,315"></RectangleGeometry>
                                    <EllipseGeometry x:Name="circle" RadiusX="100" RadiusY="100" Center="210,155"/>
                                </GeometryGroup>
                            </Path.Data>
                        </Path>
                        <Path x:Name="fieldr" Fill="#40FF0000" Visibility="Hidden">
                            <Path.Data>
                                <GeometryGroup>
                                    <!--Center为圆心的坐标，RadiusX、RadiusY分别为X、Y两轴的半径-->
                                    <RectangleGeometry x:Name="rectr" Rect="0,0,420,315"></RectangleGeometry>
                                    <RectangleGeometry x:Name="rectrr" Rect="110,55,100,100"></RectangleGeometry>
                                </GeometryGroup>
                            </Path.Data>
                        </Path>
                        <!--<Canvas.Background>
                    <ImageBrush ImageSource="img/test.jpg"/>
                </Canvas.Background>-->
                    </Canvas>


                    <Canvas Width="420" Height="25" Canvas.Top="315" Background="White">
                        <Label x:Name="lblpicmsg" Content="1#    A58%+B40%+C2%j 100X" Foreground="White" Width="420" Height="25" HorizontalContentAlignment="Center" VerticalContentAlignment="Top" FontSize="12" Background="#FF434E61"></Label>
                        <Button x:Name="btnanalysis" Content="分析过程" Width="70" Height="17" FontSize="13" Foreground="White" Background="#FF169BD5" Canvas.Left="345" Canvas.Top="4" FontWeight="Bold" Cursor="Hand" MouseMove="btnanalysis_MouseMove" MouseLeave="btnanalysis_MouseLeave">
                            <Button.Template >
                                <ControlTemplate TargetType="{x:Type Button}" >
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" CornerRadius="7,7,7,7">
                                        <Border.Background>
                                            <Brush>#FF169BD5</Brush>
                                        </Border.Background>
                                        <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                    </Canvas>
                    <Border x:Name="box" BorderThickness="2,2,2,2" Width="420" Height="315" Canvas.Left="0" Canvas.Top="0" BorderBrush="#FF169BD5" Visibility="Hidden"/>
                </Canvas>
            </ScrollViewer>
        </Viewbox>
    </Grid>
</UserControl>
