A visual element that contains a manipulator that can translate along an axis.
Inheritance: Manipulator
        /// <summary>
        /// Initializes a new instance of the <see cref="CombinedManipulator" /> class.
        /// </summary>
        public CombinedManipulator()
        {
            this.translateXManipulator = new TranslateManipulator
            {
                Direction = new Vector3D(1, 0, 0), Color = Colors.Red
            };
            this.translateYManipulator = new TranslateManipulator
            {
                Direction = new Vector3D(0, 1, 0), Color = Colors.Green
            };
            this.translateZManipulator = new TranslateManipulator
            {
                Direction = new Vector3D(0, 0, 1), Color = Colors.Blue
            };
            this.rotateXManipulator = new RotateManipulator {
                Axis = new Vector3D(1, 0, 0), Color = Colors.Red
            };
            this.rotateYManipulator = new RotateManipulator {
                Axis = new Vector3D(0, 1, 0), Color = Colors.Green
            };
            this.rotateZManipulator = new RotateManipulator {
                Axis = new Vector3D(0, 0, 1), Color = Colors.Blue
            };

            BindingOperations.SetBinding(this, TransformProperty, new Binding("TargetTransform")
            {
                Source = this
            });

            BindingOperations.SetBinding(
                this.translateXManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.translateYManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.translateZManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateXManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateYManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateZManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateXManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateYManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });
            BindingOperations.SetBinding(
                this.rotateZManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform")
            {
                Source = this
            });

            this.UpdateChildren();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CombinedManipulator" /> class.
        /// </summary>
        public CombinedManipulator()
        {
            this.translateXManipulator = new TranslateManipulator
                {
                   Direction = new Vector3D(1, 0, 0), Color = Colors.Red
                };
            this.translateYManipulator = new TranslateManipulator
                {
                   Direction = new Vector3D(0, 1, 0), Color = Colors.Green
                };
            this.translateZManipulator = new TranslateManipulator
                {
                   Direction = new Vector3D(0, 0, 1), Color = Colors.Blue
                };
            this.rotateXManipulator = new RotateManipulator { Axis = new Vector3D(1, 0, 0), Color = Colors.Red };
            this.rotateYManipulator = new RotateManipulator { Axis = new Vector3D(0, 1, 0), Color = Colors.Green };
            this.rotateZManipulator = new RotateManipulator { Axis = new Vector3D(0, 0, 1), Color = Colors.Blue };

            BindingOperations.SetBinding(this, TransformProperty, new Binding("TargetTransform") { Source = this });

            BindingOperations.SetBinding(
                this.translateXManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });
            BindingOperations.SetBinding(
                this.translateYManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });
            BindingOperations.SetBinding(
                this.translateZManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });
            BindingOperations.SetBinding(
                this.rotateXManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter") { Source = this });
            BindingOperations.SetBinding(
                this.rotateYManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter") { Source = this });
            BindingOperations.SetBinding(
                this.rotateZManipulator, RotateManipulator.DiameterProperty, new Binding("Diameter") { Source = this });
            BindingOperations.SetBinding(
                this.rotateXManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });
            BindingOperations.SetBinding(
                this.rotateYManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });
            BindingOperations.SetBinding(
                this.rotateZManipulator,
                Manipulator.TargetTransformProperty,
                new Binding("TargetTransform") { Source = this });

            this.UpdateChildren();
        }
        private void Load3DModel(object sender, RoutedEventArgs e)
        {
            Model3DGroup modelgroup = null;

            try
            {
                //Adding a gesture here
                //viewPort3d.RotateGesture = new MouseGesture(MouseAction.LeftClick);

                //Import 3D model file
                HelixToolkit.Wpf.ModelImporter import = new HelixToolkit.Wpf.ModelImporter();

                //Load the 3D model file
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Filter = "3D files (*.3ds)|*.3ds|All files (*.*)|*.*";
                if (openFileDialog.ShowDialog() == true)
                {
                    modelgroup = import.Load(openFileDialog.FileName);
                    ModelVisual3D model = new ModelVisual3D();
                    model.Content = modelgroup;

                    Vector3D position             = new Vector3D(600, 0, 0);
                    Vector3D axis                 = new Vector3D(1, 0, 0);         //In case you want to rotate it about the x-axis
                    Matrix3D transformationMatrix = model.Content.Transform.Value; //Gets the matrix indicating the current transformation value
                    transformationMatrix.Rotate(new Quaternion(axis, 0));          //Makes a rotation transformation over this matrix
                    //transformationMatrix.RotateAt(new Quaternion(axis, angle), modelCenter); //modelCenter is the Point3D variable indicating the center
                    transformationMatrix.Translate(position);
                    model.Content.Transform = new MatrixTransform3D(transformationMatrix); //Applies the transformation to your model

                    helix_viewport3d.Children.Add(model);

                    Rect3D bounds = model.Content.Bounds;

                    /*
                     * HelixToolkit.Wpf.CombinedManipulator manipulator = new HelixToolkit.Wpf.CombinedManipulator();
                     * manipulator.CanTranslateX = true;
                     * manipulator.CanTranslateY = true;
                     * manipulator.CanTranslateZ = true;
                     * manipulator.CanRotateX = true;
                     * manipulator.CanRotateY = true;
                     * manipulator.CanRotateZ = true;
                     * manipulator.Diameter = Math.Max(bounds.SizeX, Math.Max(bounds.SizeY, bounds.SizeZ)) * 1.2;
                     * manipulator.Position = new Point3D(position.X,position.Y,position.Z);
                     * manipulator.Pivot = new Point3D(position.X, position.Y, position.Z);
                     * manipulator.TargetTransform = model.Transform;
                     * manipulator.Transform = model.Transform;
                     * manipulator.Bind(model);
                     * helix_viewport3d.Children.Add(manipulator);
                     */
                    HelixToolkit.Wpf.TranslateManipulator man_x = new HelixToolkit.Wpf.TranslateManipulator();
                    HelixToolkit.Wpf.TranslateManipulator man_y = new HelixToolkit.Wpf.TranslateManipulator();
                    HelixToolkit.Wpf.TranslateManipulator man_z = new HelixToolkit.Wpf.TranslateManipulator();

                    man_x.Direction       = new Vector3D(1, 0, 0);
                    man_x.Length          = 200;
                    man_x.Diameter        = 20;
                    man_x.Color           = Colors.Red;
                    man_x.Offset          = new Vector3D(30, 0, 0);
                    man_x.Position        = new Point3D(position.X, position.Y, position.Z);
                    man_x.Transform       = model.Transform;
                    man_x.TargetTransform = model.Transform;
                    man_x.Bind(model);

                    man_y.Direction       = new Vector3D(0, 1, 0);
                    man_y.Length          = 200;
                    man_y.Diameter        = 20;
                    man_y.Color           = Colors.Green;
                    man_y.Offset          = new Vector3D(0, 30, 0);
                    man_y.Position        = new Point3D(position.X, position.Y, position.Z);
                    man_y.Transform       = model.Transform;
                    man_y.TargetTransform = model.Transform;
                    man_y.Bind(model);

                    man_z.Direction       = new Vector3D(0, 0, 1);
                    man_z.Length          = 200;
                    man_z.Diameter        = 20;
                    man_z.Color           = Colors.Blue;
                    man_z.Offset          = new Vector3D(0, 0, 30);
                    man_z.Position        = new Point3D(position.X, position.Y, position.Z);
                    man_z.Transform       = model.Transform;
                    man_z.TargetTransform = model.Transform;
                    man_z.Bind(model);

                    helix_viewport3d.Children.Add(man_x);
                    helix_viewport3d.Children.Add(man_y);
                    helix_viewport3d.Children.Add(man_z);
                }
            }
            catch (Exception ex)
            {
                // Handle exception in case can not find the 3D model file
                MessageBox.Show("Exception Error : " + ex.StackTrace);
            }
        }