summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml15
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml.cs4
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml34
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs3
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml25
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml.cs27
6 files changed, 79 insertions, 29 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 938e31719..29565cf1c 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -1,23 +1,16 @@
-<Window x:Class="HandBrakeWPF.Views.MainView"
+<UserControl x:Class="HandBrakeWPF.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
- Title="{Data:Binding Path=WindowTitle}"
- Width="1015"
- Height="652"
- MinWidth="1015"
- MinHeight="652"
AllowDrop="True"
Background="#FFF0F0F0"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
- WindowStartupLocation="CenterScreen"
>
<i:Interaction.Triggers>
@@ -34,7 +27,7 @@
</i:EventTrigger>
</i:Interaction.Triggers>
- <Window.Resources>
+ <UserControl.Resources>
<Style TargetType="Button">
<Setter Property="Foreground" Value="DarkOrange" />
@@ -81,7 +74,7 @@
</Style>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
- </Window.Resources>
+ </UserControl.Resources>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
@@ -628,4 +621,4 @@
</StatusBar>
</Grid>
-</Window>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
index 165e74923..2845ff0f2 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
@@ -9,12 +9,12 @@
namespace HandBrakeWPF.Views
{
- using System.Windows;
+ using System.Windows.Controls;
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
- public partial class MainView : Window
+ public partial class MainView : UserControl
{
/// <summary>
/// Initializes a new instance of the <see cref="MainView"/> class.
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index e79fd91a7..80a97754f 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -1,9 +1,9 @@
-<Window x:Class="HandBrakeWPF.Views.OptionsView"
+<UserControl x:Class="HandBrakeWPF.Views.OptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
- xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" SizeToContent="Height" Width="620">
+ xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" >
- <Window.Resources>
+ <UserControl.Resources>
<Style TargetType="Button">
<Setter Property="Foreground" Value="DarkOrange" />
<Setter Property="FontWeight" Value="Bold" />
@@ -21,12 +21,17 @@
<Style TargetType="CheckBox">
<Setter Property="Margin" Value="0,0,0,5" />
</Style>
- </Window.Resources>
-
-
- <StackPanel Orientation="Vertical" Background="#FFF1F0EF">
+ </UserControl.Resources>
+
+ <Grid Background="#FFF1F0EF">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
<!-- Header -->
- <StackPanel Orientation="Horizontal" Background="White" Height="50" >
+ <StackPanel Orientation="Horizontal" Background="White" Height="50" Grid.Row="0" >
<Image Source="Images/Preferences.png" Margin="10,0,5,0" Width="32" Height="32" VerticalAlignment="Center" />
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="Options" FontWeight="Bold" />
@@ -35,7 +40,7 @@
</StackPanel>
<!-- Options Panel-->
- <TabControl Margin="10,10,10,10" Height="405">
+ <TabControl Margin="10,10,10,10" MinHeight="410" Grid.Row="1">
<TabItem Header="General">
<StackPanel Orientation="Vertical">
<Grid Margin="10,10,0,10">
@@ -367,12 +372,11 @@
</TabItem>
</TabControl>
- <StackPanel HorizontalAlignment="Stretch" Background="LightGray" >
- <Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
- HorizontalAlignment="Right" Padding="10,2" Margin="0,5,10,5" />
+ <StackPanel HorizontalAlignment="Stretch" Background="LightGray" Grid.Row="2" >
+ <Button Content="Save Changes" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
+ HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" />
</StackPanel>
-
- </StackPanel>
-</Window>
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
index e17c98514..b8fd4b33d 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
@@ -10,11 +10,12 @@
namespace HandBrakeWPF.Views
{
using System.Windows;
+ using System.Windows.Controls;
/// <summary>
/// Interaction logic for OptionsView.xaml
/// </summary>
- public partial class OptionsView : Window
+ public partial class OptionsView : UserControl
{
/// <summary>
/// Initializes a new instance of the <see cref="OptionsView"/> class.
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
new file mode 100644
index 000000000..9aba2a3fe
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -0,0 +1,25 @@
+<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" Title="{Data:Binding Path=WindowTitle}"
+ Width="1015"
+ Height="652"
+ MinWidth="1015"
+ MinHeight="652"
+ AllowDrop="True"
+ Background="#FFF0F0F0"
+ FontSize="11"
+ SnapsToDevicePixels="True"
+ UseLayoutRounding="True"
+ WindowStartupLocation="CenterScreen"
+ >
+ <Window.Resources>
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ </Window.Resources>
+
+ <Grid>
+ <ContentControl x:Name="MainViewModel" Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ <ContentControl x:Name="OptionsViewModel" Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ </Grid>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
new file mode 100644
index 000000000..cc6b381de
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ShellView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for ShellView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows;
+
+ /// <summary>
+ /// Interaction logic for ShellView.xaml
+ /// </summary>
+ public partial class ShellView : Window
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ShellView"/> class.
+ /// </summary>
+ public ShellView()
+ {
+ this.InitializeComponent();
+ }
+ }
+}