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"
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"/>
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" />
23 <Rectangle x:Name="viewport" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
25 <Grid Grid.Column="1">
26 <Grid.ColumnDefinitions>
27 <ColumnDefinition Width="Auto"/>
29 </Grid.ColumnDefinitions>
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>
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">
47 <ContextMenu x:Name="predefinedValuesMenu">
48 <!-- MenuItem x:Name="menuZoom50X" Header="50X: 230'000 PPI" />
49 <MenuItem x:Name="menuZoom100X" Header="100X: 460'000 PPI" / -->
53 <Style TargetType="{x:Type Button}">
55 <EventTrigger RoutedEvent="Click">
56 <EventTrigger.Actions>
59 <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="ContextMenu.IsOpen">
60 <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/>
61 </BooleanAnimationUsingKeyFrames>
64 </EventTrigger.Actions>
70 <Button x:Name="butPPICalculator" Content="PPI calculator" Grid.Column="2" Margin="3" />