In the Panel3D control, since you have 3 dp's for X, Y, Z you can achieve the required by creating one more dependancy property of type Point3D and bind it to the Position property of the PerspectiveCamera, like below.
<Viewport3D.Camera>
<PerspectiveCamera
LookDirection="0,0,-10"
Position={Binding Calculated3DPoint}
UpDirection="0,10,0"
/>
</Viewport3D.Camera
In the callback of each dependancy property calculate update the Caluclated3DPoint property like.
#region Properties
public double CorX
{
get { return (double)GetValue(CorXProperty); }
set { SetValue(CorXProperty, value); }
}
public double CorY
{
get { return (double)GetValue(CorYProperty); }
set { SetValue(CorYProperty, value); }
}
public double CorZ
{
get { return (double)GetValue(CorZProperty); }
set { SetValue(CorZProperty, value); }
}
public Point3D Calculated3DPoint
{
get { return (Point3D)GetValue(Calculated3DPointProperty); }
set { SetValue(Calculated3DPointProperty, value); }
}
#endregion
#region Dependency Properties
public static readonly DependencyProperty CorXProperty =
DependencyProperty.Register("CorX", typeof(double), typeof(MainWindow), new UIPropertyMetadata(0d, (dependencyObject, e) =>
{
var v = (MainWindow)dependencyObject;
if (v != null)
{
v.Calculated3DPoint = new Point3D((double)e.NewValue, v.CorY, v.CorZ);
}
}));
public static readonly DependencyProperty CorYProperty =
DependencyProperty.Register("CorY", typeof(double), typeof(MainWindow), new UIPropertyMetadata(0d, (dependencyObject, e) =>
{
var v = (MainWindow)dependencyObject;
if (v != null)
{
v.Calculated3DPoint = new Point3D(v.CorX, (double)e.NewValue, v.CorZ);
}
}));
public static readonly DependencyProperty CorZProperty =
DependencyProperty.Register("CorZ", typeof(double), typeof(MainWindow), new UIPropertyMetadata(0d, (dependencyObject, e) =>
{
var v = (MainWindow)dependencyObject;
if (v != null)
{
v.Calculated3DPoint = new Point3D(v.CorX, v.CorY, (double)e.NewValue);
}
}));
public static readonly DependencyProperty Calculated3DPointProperty =
DependencyProperty.Register("Calculated3DPoint", typeof(Point3D), typeof(MainWindow), new UIPropertyMetadata(new Point3D()));
#endregion
HTH