summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-08-23 22:32:28 +0100
committersr55 <[email protected]>2017-08-23 22:32:28 +0100
commitffa1a048c75be90797b9c98a8d62a5fc8b03326b (patch)
treefb87366bcb1e57c0c96acbbe5de5bf75bd64c882 /win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs
parent4d3958bfaeec0fd72de01b58a40c3335d1651cf0 (diff)
WinGui: Summary Tab - Make the preview controls operational. #833
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);
+ }
+ }
}
}