summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
blob: 830a283d40f4d4bcb74ff0e8481f9af149c0d8d4 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<Window x:Class="HandBrakeWPF.Views.PopupWindowView"
             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:properties="clr-namespace:HandBrakeWPF.Properties"
             xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
             d:DesignHeight="250"
             d:DesignWidth="650"
             MaxHeight="650"
             Title="{Binding Title}"
             ResizeMode="NoResize"
             SizeToContent="WidthAndHeight"
             WindowStartupLocation="CenterScreen"
             TextOptions.TextFormattingMode="Display"
             mc:Ignorable="d">
    
    <Window.Resources>
        <converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
    </Window.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock Text="{Binding WindowTitle}" FontSize="26" FontFamily="Segoe UI Light" Margin="10,10,10,5" Grid.Row="0" />
        <TextBlock Text="{Binding SubText}" Margin="10,0,10,15" Grid.Row="1" Visibility="{Binding SubTextVisible, Converter={StaticResource boolToVisConverter}}"
                   TextWrapping="Wrap"/>

        <Border BorderBrush="DarkGray" BorderThickness="0,1,0,0" Grid.Row="2" Margin="0,0,0,0">
            <ScrollViewer  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalScrollBarVisibility="Auto"   >
                <ContentControl x:Name="ContentViewModel"/>
            </ScrollViewer>
        </Border>

        <Border BorderBrush="DarkGray"  Grid.Row="3"  BorderThickness="0,1,0,0"  Margin="0,20,0,0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <Button Grid.Column="1"
                    Margin="0,5,10,10"
                    cal:Message.Attach="[Event Click] = [Action Cancel]"
                    Content="{x:Static properties:Resources.Generic_Cancel}"
                    IsCancel="True"
                    Visibility="Collapsed"
                    Padding="8,2" />
                <Button Grid.Column="2"
                    Margin="0,5,10,10"
                    cal:Message.Attach="[Event Click] = [Action Save]"
                    Content="{x:Static properties:Resources.Generic_Save}"
                    IsDefault="True"
                    Padding="8,2" />
            </Grid>
        </Border>

    </Grid>
   
</Window>