nature_net.MainWindow.workspace_ManipulationStarting C# (CSharp) Method

workspace_ManipulationStarting() private method

private workspace_ManipulationStarting ( object sender, System.Windows.Input.ManipulationStartingEventArgs e ) : void
sender object
e System.Windows.Input.ManipulationStartingEventArgs
return void
        void workspace_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
        {
            e.ManipulationContainer = this.workspace;
            e.Mode = ManipulationModes.All;
            FrameworkElement element = (FrameworkElement)e.Source;
            if (element == null) return;

            if (configurations.enable_single_rotation)
            {
                //if (e.Manipulators.Count() > 0)
                //{
                //    TouchDevice td = (TouchDevice)(e.Manipulators.First());
                //    TouchPoint tp = td.GetTouchPoint(element);
                //    e.Pivot = new ManipulationPivot(new Point(tp.Position.X, tp.Position.Y), 48);
                //}
                System.Windows.Point center = new System.Windows.Point(element.ActualWidth / 2, element.ActualHeight / 2);
                center = element.TranslatePoint(center, this.workspace);
                e.Pivot = new ManipulationPivot(center, configurations.manipulation_pivot_radius);
            }

            window_manager.UpdateZOrder(element, true);
            try
            {
                user_controls.window_frame f = (user_controls.window_frame)element;
                try { window_content c = (window_content)f.window_content.Content; window_manager.UpdateZOrder(c.GetKeyboardFrame(), true); }
                catch (Exception) { }
                try { signup s = (signup)f.window_content.Content; window_manager.UpdateZOrder(s.GetKeyboardFrame(), true); window_manager.UpdateZOrder(s.GetAvatarFrame(), true); window_manager.UpdateZOrder(s.GetNumpadFrame(), true); }
                catch (Exception) { }
            }
            catch (Exception) { }
        }