コード例 #1
0
        private static void OrientationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TransformationGizmo gizmo = (TransformationGizmo)d;

            gizmo.RotationIndicatorTransform.Angle = gizmo.Orientation;
            gizmo.RotationBallTransform.Angle      = gizmo.Orientation;
            gizmo.RotationText.Text = string.Format("{0}°", Math.Round(gizmo.Orientation, 2));
        }
コード例 #2
0
        private static void YDraggingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TransformationGizmo gizmo = (TransformationGizmo)d;

            if (!(bool)e.NewValue)
            {
                gizmo.IsHitTestVisible = true;
            }
        }
コード例 #3
0
        private static void RotationEnabledPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TransformationGizmo gizmo = (TransformationGizmo)d;
            bool rotationEnabled      = (bool)e.NewValue;

            gizmo.RotationBall.Visibility = rotationEnabled ? Visibility.Visible : Visibility.Hidden;
            gizmo.RotationLine.Visibility = rotationEnabled ? Visibility.Visible : Visibility.Hidden;
            gizmo.RotationRing.Visibility = rotationEnabled ? Visibility.Visible : Visibility.Hidden;
            gizmo.RotationText.Visibility = rotationEnabled ? Visibility.Visible : Visibility.Hidden;
        }