RayHitTestParameters.Direction Property
.NET Framework 4
Gets or sets a Vector3D that indicates the direction (from its origin) of the ray along which to hit test.
Assembly: PresentationCore (in PresentationCore.dll)
Property Value
Type: System.Windows.Media.Media3D.Vector3DVector3D that indicates the direction of the ray along which to hit test.
public void HitTest(object sender, System.Windows.Input.MouseButtonEventArgs args) { Point mouseposition = args.GetPosition(myViewport); Point3D testpoint3D = new Point3D(mouseposition.X, mouseposition.Y, 0); Vector3D testdirection = new Vector3D(mouseposition.X, mouseposition.Y, 10); PointHitTestParameters pointparams = new PointHitTestParameters(mouseposition); RayHitTestParameters rayparams = new RayHitTestParameters(testpoint3D, testdirection); //test for a result in the Viewport3D VisualTreeHelper.HitTest(myViewport, null, HTResult, pointparams);
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.