summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/ShellView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-11-29 20:06:12 +0000
committersr55 <[email protected]>2014-11-29 20:06:12 +0000
commit016614620206b8406fb20897733567fa90602580 (patch)
tree3d0a7f87f4b9d9056fb4668243495f091121bb05 /win/CS/HandBrakeWPF/Views/ShellView.xaml
parent9c9a769493c732fdcdcd5b62710b6231863c53ba (diff)
WinGui: Move the event trigger to make drag/drop of files on the UI more reliable.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6571 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/ShellView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml12
1 files changed, 11 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
index c9702a7a7..ab82b298a 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -4,6 +4,8 @@
xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:views="clr-namespace:HandBrakeWPF.Views"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:cal="http://www.caliburnproject.org"
Title="{Data:Binding Path=WindowTitle}"
Width="1015"
Height="675"
@@ -20,7 +22,15 @@
<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" Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
<ContentControl x:Name="OptionsViewModel" Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />