summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/ShellView.xaml
blob: fafa28d31fcaa772ef20372def009cbd8bd6162a (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
<Window x:Class="HandBrakeWPF.Views.ShellView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
        xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:cal="http://www.caliburnproject.org"
        Title="{Data:Binding Path=WindowTitle}"
        Width="1015"
        Height="675"
        MinWidth="750"
        MinHeight="675"
        AllowDrop="True"
        SnapsToDevicePixels="True"
        UseLayoutRounding="True"
        WindowStartupLocation="CenterScreen"
        TextOptions.TextFormattingMode="Display"
        x:Name="shellView"
        >
    <Window.Resources>
        <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
    </Window.Resources>

    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Drop">
            <cal:ActionMessage MethodName="FilesDroppedOnWindow">
                <cal:Parameter Value="$eventArgs" />
            </cal:ActionMessage>
        </i:EventTrigger>
    </i:Interaction.Triggers>

    <Grid>
        <ContentControl x:Name="MainViewModel"  Panel.ZIndex="0"  Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
                        IsEnabled="{Binding IsMainPanelEnabled}" />
        <ContentControl x:Name="OptionsViewModel"  Panel.ZIndex="0"  Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
                        IsEnabled="{Binding IsMainPanelEnabled}" />
    </Grid>
</Window>