summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
blob: df437bd7775e9f94394e5fb46c00dc1f195b5151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<Window x:Class="HandBrakeWPF.Views.StaticPreviewView"
             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:cal="http://www.caliburnproject.org"
             xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
             mc:Ignorable="d" SizeToContent="WidthAndHeight"
             TextOptions.TextFormattingMode="Display"
             WindowStartupLocation="CenterScreen"
             cal:Message.Attach="[Event SizeChanged] = [Action PreviewSizeChanged($eventArgs)]"       
             Title="{Binding Title}">
    
    <Window.Resources>
        <converters:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    </Window.Resources>
    <Grid>

        <StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="LightGray" Visibility="{Binding PreviewNotAvailable, Converter={StaticResource booleanToVisibilityConverter}}">
            <TextBlock Text="No Preview Available" VerticalAlignment="Center" Padding="60,60,60,60" FontWeight="Bold" FontSize="25" Foreground="DarkGray" />
        </StackPanel>

        <Image Source="{Binding PreviewImage}" MaxWidth="{Binding Width}" MaxHeight="{Binding Height}" />
        <Slider Maximum="{Binding TotalPreviews}" Minimum="0" 
                Value="{Binding SelectedPreviewImage}"
                VerticalAlignment="Bottom"
                HorizontalAlignment="Center"
                Margin="0,0,0,20" Width="150" 
                Background="Transparent" 
                />
    </Grid>
</Window>