summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-11-27 21:01:15 +0000
committersr55 <[email protected]>2014-11-27 21:01:15 +0000
commit69d30f36f080a863e73f152691569e3f2322600e (patch)
tree7c3535f44d9e2437dfd2efe9f6b87df6b6aa8332 /win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
parentb8238f76de25707da2d9e480d265c94d3d7d1ada (diff)
WinGui: Don't allow previews less than 32x32 as it'll crash. Handle SEH exceptions for this method.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6561 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml9
1 files changed, 9 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
index ae044945c..df437bd77 100644
--- a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
+++ b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml
@@ -4,13 +4,22 @@
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}"