<UserControl x:Class="FLY.ControlLibrary.GraphScanCircular"
             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:FLY.ControlLibrary"
             mc:Ignorable="d" 
             d:DesignHeight="315" d:DesignWidth="430" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <ControlTemplate x:Key="picture_button" TargetType="Button">
            <Border Name="border" BorderThickness="1" CornerRadius="5">
                <ContentPresenter Content="{TemplateBinding Content}"/>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
                </Trigger>
                <Trigger Property="IsPressed" Value="True">
                    <Setter TargetName="border" Property="Background" Value="LightGray"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
    </UserControl.Resources>
    <Grid Name="grid" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="18" />
                <RowDefinition Height="22" />
            </Grid.RowDefinitions>
            <Rectangle Name="rectangle" Fill="#FF579aab"/>
            <TextBlock HorizontalAlignment="Center" FontSize="18" VerticalAlignment="Bottom" Grid.RowSpan="2">
                <TextBlock.Inlines>
                    <Run Name="run_title" Text="{Binding Title}" FontWeight="SemiBold" />
                    <Run Name="run_title2" Text="{Binding Title2}" Foreground="#FF585858" />
                </TextBlock.Inlines>
            </TextBlock>
        </Grid>
        <StackPanel Orientation="Horizontal">
            <Button x:Name="m_LogoImageButtonUC" Height="40" Width="40"  Click="Button_Click" Template="{StaticResource ResourceKey=picture_button}">
                    <Image Source="/FLY.ControlLibrary;component/Images/info.png" />
            </Button>
        </StackPanel>
        <Viewbox  Grid.Row="1" Margin="6">
            <Canvas x:Name="LayoutRoot" Width="600" Height="600" />
        </Viewbox>
        <TextBlock Name="run_calstate" Grid.Row="1" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Bottom" Margin="6">
                <TextBlock.Inlines>
                    <Run Text="Max:" FontWeight="SemiBold" />
                    <Run Text="{Binding CalState_Max}" FontWeight="SemiBold" />
                    <LineBreak/>
                    <Run Text="Min:" FontWeight="SemiBold" />
                    <Run Text="{Binding CalState_Min}" FontWeight="SemiBold" />
                    <LineBreak/>
                    <Run Text="Avg:" FontWeight="SemiBold" />
                    <Run Text="{Binding CalState_Avg}" FontWeight="SemiBold" />
                    <LineBreak/>
                    <Run Text="2σ:" FontWeight="SemiBold" />
                    <Run Text="{Binding CalState_2Sigma}" FontWeight="SemiBold" />
                </TextBlock.Inlines>
        </TextBlock>
    </Grid>

</UserControl>