summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs')
-rw-r--r--win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs b/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
index e3c35b48e..744003698 100644
--- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
@@ -10,6 +10,12 @@
namespace HandBrakeWPF.Views
{
using System.Windows.Controls;
+ using System.Windows.Input;
+
+ using HandBrakeWPF.ViewModels.Interfaces;
+
+ using Image = System.Windows.Controls.Image;
+ using Point = System.Windows.Point;
/// <summary>
/// Interaction logic for SummaryView.xaml
@@ -20,5 +26,21 @@ namespace HandBrakeWPF.Views
{
this.InitializeComponent();
}
+
+ private void PreviewImage_OnMouseMove(object sender, MouseEventArgs e)
+ {
+ Image image = sender as Image;
+
+ if (image != null && image.ActualWidth > 0)
+ {
+ Point p = Mouse.GetPosition(image);
+ double width = image.ActualWidth / 2;
+
+ bool leftHalf = p.X <= width;
+ bool rightHalf = p.X > width;
+
+ ((ISummaryViewModel)this.DataContext).SetPreviewControlVisibility(leftHalf, rightHalf);
+ }
+ }
}
}