-<UserControl x:Class="HandBrakeWPF.Controls.StatusPanel"\r
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
+<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
- xmlns:ctr="clr-namespace:HandBrakeWPF.Controls">\r
+ xmlns:ctr="clr-namespace:HandBrakeWPF.Controls"\r
+ x:Class="HandBrakeWPF.Controls.StatusPanel"\r
+ FontFamily="S"\r
+ >\r
\r
<UserControl.Resources>\r
<BooleanToVisibilityConverter x:Key="boolTovisibility" />\r
</UserControl.Resources>\r
+ \r
+ <Grid>\r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="*" />\r
+ <RowDefinition Height="Auto" />\r
+ <RowDefinition Height="*" />\r
+ </Grid.RowDefinitions>\r
\r
- <DockPanel Background="Black" Opacity="0.85"\r
- Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, \r
- Path=IsLoading, Mode=OneWay, Converter={StaticResource boolTovisibility}}">\r
+ <StackPanel Grid.Row="0" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
\r
- <ctr:Loading DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top"\r
- Height="45" Margin="18,10" />\r
+ <Grid VerticalAlignment="Center" Grid.Row="1" HorizontalAlignment="Stretch"\r
+ Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">\r
+ \r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto" />\r
+ <RowDefinition Height="Auto" />\r
+ </Grid.RowDefinitions>\r
+\r
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="0" MaxHeight="220" MinHeight="220">\r
+ <ctr:Loading HorizontalAlignment="Center" VerticalAlignment="Center" Height="45" Margin="18,10" />\r
+\r
+ <StackPanel VerticalAlignment="Center" Orientation="Vertical" >\r
+ <StackPanel VerticalAlignment="Center" MinWidth="300">\r
+ <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="26" FontFamily="Segoe UI Light" Margin="0,11,0,0" HorizontalAlignment="Left"\r
+ FontWeight="Bold" TextWrapping="WrapWithOverflow"\r
+ Text="{Binding Message, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"\r
+ />\r
+\r
+ <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="16" FontFamily="Segoe UI Light" Margin="0,5" HorizontalAlignment="Left"\r
+ Text="{Binding SubMessage, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" \r
+ TextWrapping="WrapWithOverflow"\r
+ />\r
+ </StackPanel>\r
+ \r
+ <Button Content="{Binding ActionText, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Margin="0,10,0,0"\r
+ x:Name="StatusActionButton" Click="StatusActionButton_OnClick" Padding="8,2" HorizontalAlignment="Right"\r
+ Visibility="{Binding IsActionButtonVisible, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource boolTovisibility}}" />\r
+\r
+ </StackPanel>\r
+ </StackPanel>\r
+\r
+ \r
+ </Grid>\r
+\r
+ <StackPanel Grid.Row="2" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+\r
+ </Grid>\r
\r
- <StackPanel VerticalAlignment="Top">\r
- <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="16" Margin="0,11,0,0" HorizontalAlignment="Left"\r
- FontWeight="Bold"\r
- Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=Message}" \r
- Foreground="LightBlue" />\r
\r
- <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="12" Margin="0,5" HorizontalAlignment="Left"\r
- Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=SubMessage}" \r
- Foreground="LightBlue" />\r
- </StackPanel>\r
- </DockPanel>\r
</UserControl>\r
\r
namespace HandBrakeWPF.Controls\r
{\r
+ using System;\r
using System.Windows;\r
using System.Windows.Controls;\r
\r
public StatusPanel()\r
{\r
InitializeComponent();\r
+ this.Message = "Message";\r
}\r
\r
/// <summary>\r
/// Dependancy Property for the Message Property\r
/// </summary>\r
public static readonly DependencyProperty MessageProperty =\r
- DependencyProperty.Register("Message", typeof(string), typeof(StatusPanel), new UIPropertyMetadata(string.Empty));\r
+ DependencyProperty.Register("Message", typeof(string), typeof(StatusPanel), new UIPropertyMetadata("Loading..."));\r
\r
/// <summary>\r
/// Dependancy Property for the submessage propery\r
/// </summary>\r
public static readonly DependencyProperty SubMessageProperty =\r
- DependencyProperty.Register("SubMessage", typeof(string), typeof(StatusPanel), new UIPropertyMetadata(string.Empty));\r
+ DependencyProperty.Register("SubMessage", typeof(string), typeof(StatusPanel), new FrameworkPropertyMetadata("Please Wait", FrameworkPropertyMetadataOptions.AffectsRender));\r
+\r
+ /// <summary>\r
+ /// Dependancy Property for the submessage propery\r
+ /// </summary>\r
+ public static readonly DependencyProperty ActionProperty =\r
+ DependencyProperty.Register("CancelAction", typeof(Action), typeof(StatusPanel), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.None, OnCancelActionSet));\r
+\r
+ /// <summary>\r
+ /// Dependancy Property for the submessage propery\r
+ /// </summary>\r
+ public static readonly DependencyProperty ActionTextProperty =\r
+ DependencyProperty.Register("ActionText", typeof(string), typeof(StatusPanel), new UIPropertyMetadata("Cancel"));\r
\r
/// <summary>\r
/// Gets or sets a value indicating whether IsLoading.\r
get { return (string)GetValue(SubMessageProperty); }\r
set { SetValue(SubMessageProperty, value); }\r
}\r
+\r
+ /// <summary>\r
+ /// Gets or sets the cancel action.\r
+ /// </summary>\r
+ public Action CancelAction\r
+ {\r
+ get { return (Action)GetValue(ActionProperty); }\r
+ set { SetValue(SubMessageProperty, value); }\r
+ }\r
+\r
+ /// <summary>\r
+ /// The on cancel action set.\r
+ /// </summary>\r
+ /// <param name="d">\r
+ /// The d.\r
+ /// </param>\r
+ /// <param name="e">\r
+ /// The e.\r
+ /// </param>\r
+ private static void OnCancelActionSet(DependencyObject d, DependencyPropertyChangedEventArgs e)\r
+ {\r
+ \r
+ }\r
+\r
+ /// <summary>\r
+ /// Gets or sets the action text.\r
+ /// </summary>\r
+ public string ActionText\r
+ {\r
+ get { return (string)GetValue(ActionTextProperty); }\r
+ set { SetValue(ActionTextProperty, value); }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Gets a value indicating whether is action button visible.\r
+ /// </summary>\r
+ public bool IsActionButtonVisible\r
+ {\r
+ get\r
+ {\r
+ return true; // this.CancelAction != null;\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// The status action button_ on click.\r
+ /// </summary>\r
+ /// <param name="sender">\r
+ /// The sender.\r
+ /// </param>\r
+ /// <param name="e">\r
+ /// The e.\r
+ /// </param>\r
+ private void StatusActionButton_OnClick(object sender, RoutedEventArgs e)\r
+ {\r
+ if (this.CancelAction != null)\r
+ {\r
+ this.CancelAction();\r
+ }\r
+ }\r
}\r
}\r
</Grid.ColumnDefinitions>\r
\r
<Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto" />\r
<RowDefinition Height="*" />\r
<RowDefinition Height="Auto" />\r
</Grid.RowDefinitions>\r
\r
- <StackPanel Orientation="Vertical" Grid.Column="0" Margin="10,10,0,0">\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray" Margin="0,0,0,10">\r
- <TextBlock Text="Preferences" FontSize="16" />\r
- </Border>\r
+ <!-- Row 1 -->\r
+ <TextBlock Text="Options" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" Grid.ColumnSpan="2" />\r
+\r
+ <Border BorderBrush="DarkGray" Grid.Column="0" Grid.Row="1" BorderThickness="0,0,1,0">\r
+ <StackPanel Orientation="Vertical" Margin="11,5,-1,0">\r
\r
- <ListBox ItemsSource="{Binding Source={StaticResource OptionTabsList}}" SelectedItem="{Binding SelectedTab}"\r
+ <ListBox ItemsSource="{Binding Source={StaticResource OptionTabsList}}" SelectedItem="{Binding SelectedTab}"\r
BorderThickness="0" Background="Transparent">\r
- <ListBox.ItemTemplate>\r
- <DataTemplate>\r
- <TextBlock Text="{Binding Converter={StaticResource tabNameConverter}}"/>\r
- </DataTemplate>\r
- </ListBox.ItemTemplate>\r
- </ListBox>\r
+ <ListBox.ItemTemplate>\r
+ <DataTemplate>\r
+ <TextBlock Text="{Binding Converter={StaticResource tabNameConverter}}"/>\r
+ </DataTemplate>\r
+ </ListBox.ItemTemplate>\r
+ </ListBox>\r
\r
- </StackPanel>\r
+ </StackPanel>\r
+ </Border>\r
\r
- <ScrollViewer Grid.Column="1">\r
+ <ScrollViewer Grid.Column="1" Grid.Row="1" >\r
<StackPanel Orientation="Vertical">\r
\r
- <StackPanel Name="General" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="General" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.General}}">\r
\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="General" FontSize="16" />\r
- </Border>\r
+ <TextBlock Text="General" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
<StackPanel Orientation="Vertical" Margin="0,10,0,20">\r
\r
- <TextBlock Text="On Startup" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>\r
+ <TextBlock Text="On Startup" FontSize="14" Margin="0,0,0,10"/>\r
\r
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
<CheckBox Content="Check for Updates" IsChecked="{Binding CheckForUpdates}" />\r
<ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>\r
</StackPanel>\r
</StackPanel>\r
\r
<StackPanel Orientation="Vertical" Margin="0,0,0,20">\r
- <TextBlock Text="When Done" Grid.Column="0" FontSize="14" Margin="0,0,0,10" />\r
+ <TextBlock Text="When Done" FontSize="14" Margin="0,0,0,10" />\r
\r
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
<StackPanel Orientation="Horizontal">\r
<ComboBox Name="whenDone" ItemsSource="{Binding WhenDoneOptions}" SelectedItem="{Binding WhenDone}" Width="120" HorizontalAlignment="Left" />\r
\r
</StackPanel>\r
</StackPanel>\r
\r
- <StackPanel Name="Output" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="Output" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.OutputFiles}}">\r
\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="Output Files" FontSize="16" />\r
- </Border>\r
+ <TextBlock Text="Output Files" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
<StackPanel Orientation="Vertical" Margin="0,10,0,20">\r
\r
- <TextBlock Text="Automatic File Naming" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>\r
+ <TextBlock Text="Automatic File Naming" FontSize="14" Margin="0,0,0,10"/>\r
\r
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
<CheckBox Content="Automatically name output files" IsChecked="{Binding AutomaticallyNameFiles}" />\r
\r
<Grid Margin="0,5,0,0">\r
<ColumnDefinition Width="Auto" />\r
<ColumnDefinition Width="Auto" />\r
</Grid.ColumnDefinitions>\r
- \r
+\r
<TextBlock VerticalAlignment="Center" Text="Default Path: " Grid.Column="0" Grid.Row="0" />\r
<TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="380" Grid.Column="1" Grid.Row="0" \r
ToolTip="{x:Static Properties:Resources.Options_DefaultPathAdditionalParams}" Style="{StaticResource LongToolTipHolder}" />\r
</StackPanel>\r
</StackPanel>\r
\r
- <StackPanel Name="Hardware" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="Hardware" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Video}}">\r
\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="Video" FontSize="16" />\r
- </Border>\r
+ <TextBlock Text="Video" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
- <StackPanel Orientation="Vertical" Margin="0,10,0,20">\r
+ <StackPanel Orientation="Vertical" Margin="0,0,0,20">\r
\r
<TextBlock Text="Decoding" FontSize="14" Margin="0,10,0,10" />\r
\r
</StackPanel>\r
\r
<TextBlock Text="Scaling" FontSize="14" Margin="0,20,0,10" />\r
- \r
+\r
<StackPanel Orientation="Horizontal" Margin="20,0,0,0">\r
<TextBlock Text="Choose Scaler: " Margin="0,0,5,0" VerticalAlignment="Center" />\r
<ComboBox ItemsSource="{Binding ScalingOptions, Converter={StaticResource enumComboConverter}}" \r
<TextBlock Text="{x:Static Properties:Resources.Video_ScalingModes}" TextWrapping="Wrap"\r
Visibility="{Binding IsClScaling, Converter={StaticResource boolToVisConverter}}" />\r
</StackPanel>\r
- \r
+\r
</StackPanel>\r
\r
- \r
+\r
</StackPanel>\r
\r
- <StackPanel Name="Advanced" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="Advanced" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Advanced}}">\r
\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="Advanced" FontSize="16" />\r
- </Border>\r
+\r
+ <TextBlock Text="Advanced" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
<StackPanel Orientation="Vertical" Margin="0,10,0,20">\r
\r
- <TextBlock Text="Advanced Options" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>\r
+ <TextBlock Text="Advanced Options" FontSize="14" Margin="0,0,0,10"/>\r
\r
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
<CheckBox Content="Prevent the system from sleeping while encoding" IsChecked="{Binding PreventSleep}" />\r
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">\r
<TextBlock Text="Number of picture previews to scan:" VerticalAlignment="Center" Width="250" />\r
\r
</StackPanel>\r
\r
- <StackPanel Name="Updates" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="Updates" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Updates}}">\r
\r
\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="Updates" FontSize="16" />\r
- </Border>\r
+ <TextBlock Text="Updates" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
- <TextBlock Text="Current Version" Grid.Column="0" FontSize="14" Margin="0,10,0,10"/>\r
+ <TextBlock Text="Current Version" FontSize="14" Margin="0,10,0,10"/>\r
\r
<Grid Margin="20,10,0,20">\r
<Grid.ColumnDefinitions>\r
<TextBlock Grid.Column="1" Margin="0,0,0,1" VerticalAlignment="Bottom" Text="{Binding Version}" />\r
</Grid>\r
\r
- <TextBlock Text="Updates" Grid.Column="0" FontSize="14" Margin="0,10,0,10"/>\r
+ <TextBlock Text="Updates" FontSize="14" Margin="0,10,0,10"/>\r
\r
<StackPanel Margin="20,0,0,0" Orientation="Horizontal">\r
<Button Content="Check for Updates" MaxWidth="130" Margin="0,0,5,0" cal:Message.Attach="[Event Click] = [Action PerformUpdateCheck]" />\r
<StackPanel Margin="20,10,0,0" Orientation="Horizontal">\r
<ProgressBar Minimum="0" Maximum="100" Height="20" Width="400" Value="{Binding DownloadProgressPercentage}" \r
Visibility="{Binding UpdateAvailable, Converter={StaticResource boolToVisConverter}}" />\r
- \r
+\r
</StackPanel>\r
\r
<TextBlock Text="{Binding UpdateMessage}" Margin="20,5,10,0" VerticalAlignment="Center" TextWrapping="Wrap" />\r
\r
</StackPanel>\r
\r
- <StackPanel Name="About" Orientation="Vertical" Margin="10,10,0,0"\r
+ <StackPanel Name="About" Orientation="Vertical" Margin="10,5,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.About}}">\r
\r
-\r
- <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
- <TextBlock Text="About HandBrake" FontSize="16" />\r
- </Border>\r
+ <TextBlock Text="About HandBrake" FontSize="20" FontFamily="Segoe UI Light" />\r
\r
<ContentControl x:Name="AboutViewModel" />\r
\r
</StackPanel>\r
</ScrollViewer>\r
\r
- <StackPanel HorizontalAlignment="Stretch" Grid.Row="1" Grid.ColumnSpan="2" >\r
+ <StackPanel HorizontalAlignment="Stretch" Grid.Row="2" Grid.ColumnSpan="2" >\r
<StackPanel.Style>\r
<Style TargetType="StackPanel">\r
<Style.Triggers>\r
</Style.Triggers>\r
</Style>\r
</StackPanel.Style>\r
- \r
+\r
<Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"\r
HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" />\r
</StackPanel>\r
-\r
-\r
</Grid>\r
+\r
</UserControl>\r