83fa943ede1ead2c5488d3f7476726c4dc20c72c
[master-thesis.git] / Parasitemia / ParasitemiaUI / XAML / ImageSourceSelection.xaml
1 <UserControl
2                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5       xmlns:fsxaml="clr-namespace:FsXaml;assembly=FsXaml.Wpf"
6       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7       mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="120"
8                 >
9    <UserControl.Background>
10       <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}"/>
11    </UserControl.Background>
12    <Grid x:Name="gridMain">
13       <Grid.ColumnDefinitions>
14          <ColumnDefinition Width="100"/>
15          <ColumnDefinition/>
16       </Grid.ColumnDefinitions>
17       <Grid x:Name="gridImage" Grid.ColumnSpan="1" VerticalAlignment="Top">
18          <Image x:Name="imagePreview" />
19          <CheckBox x:Name="chkSelection" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="3,3,0,0"/>
20          <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#4C000000" Margin="0,0,3,3" CornerRadius="5" >
21             <TextBlock x:Name="txtImageNumber" Padding="2" Text="42" Foreground="White" />
22          </Border>
23          <Rectangle x:Name="viewport" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
24       </Grid>
25       <Grid Grid.Column="1">
26          <Grid.ColumnDefinitions>
27             <ColumnDefinition Width="Auto"/>
28             <ColumnDefinition/>
29          </Grid.ColumnDefinitions>
30          <Grid.RowDefinitions>
31             <RowDefinition Height="Auto"/>
32             <RowDefinition Height="Auto"/>
33             <RowDefinition Height="1*"/>
34          </Grid.RowDefinitions>
35          <Label Content="Last analysis" Grid.Column="0" Grid.Row="0" Margin="10,0,3,0" />
36          <Label Content="Resolution [PPI]" Grid.Column="0" Grid.Row="1" Margin="10,0,3,0" />
37          <Label x:Name="lblDateLastAnalysis" Grid.Column="1" Margin="3,0,3,0"/>
38          <Grid Grid.Column="1" Grid.Row="1">
39             <Grid.ColumnDefinitions>
40                <ColumnDefinition/>
41                <ColumnDefinition Width="Auto"/>
42                <ColumnDefinition Width="Auto"/>
43             </Grid.ColumnDefinitions>
44             <TextBox x:Name="txtResolution" Margin="3" Text="" Grid.Column="0" />
45             <Button x:Name="butDefaultResolutions" Content="Predefined values" Grid.Column="1" Margin="3">
46                <Button.ContextMenu>
47                   <ContextMenu>
48                      <MenuItem x:Name="menuZoom50X" Header="50X: 230'000 PPI" />
49                      <MenuItem x:Name="menuZoom100X" Header="100X: 460'000 PPI" />
50                   </ContextMenu>
51                </Button.ContextMenu>
52                <Button.Style>
53                   <Style TargetType="{x:Type Button}">
54                      <Style.Triggers>
55                         <EventTrigger RoutedEvent="Click">
56                            <EventTrigger.Actions>
57                               <BeginStoryboard>
58                                  <Storyboard>
59                                     <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="ContextMenu.IsOpen">
60                                        <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/>
61                                     </BooleanAnimationUsingKeyFrames>
62                                  </Storyboard>
63                               </BeginStoryboard>
64                            </EventTrigger.Actions>
65                         </EventTrigger>
66                      </Style.Triggers>
67                   </Style>
68                </Button.Style>
69             </Button>
70             <Button x:Name="butPPICalculator" Content="PPI calculator" Grid.Column="2" Margin="3" />
71          </Grid>
72       </Grid>
73    </Grid>
74 </UserControl>