BlurEffect.MainPage.Overlay_ManipulationDelta C# (CSharp) Method

Overlay_ManipulationDelta() private method

private Overlay_ManipulationDelta ( object sender, ManipulationDeltaRoutedEventArgs e ) : void
sender object
e Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs
return void
        void Overlay_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
        {
            // get the movement on X axis
            _x += (float)e.Delta.Translation.X;

            // keep the pan within the bountry
            if (_x > this.ImagePanel2.ActualWidth || _x < 0) return;

            // we clip the overlay to reveal the actual image underneath
            this.Clip.Rect = new Rect(0, 0, _x, this.ImagePanel2.ActualHeight);
        }