This documentation is archived and is not being maintained.

Point4D Structure

Represents an x-, y-, z-, and w-coordinate point in world space used in performing transformations with non-affine 3-D matrices.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

JScript supports the use of structures, but not the declaration of new ones.
<object property="x,y,z,w"/>
<object property="x y z w"/>

XAML Values


The X component of this Point4D structure.


The Y component of this Point4D structure.


The Z component of this Point4D structure.


The W component of this Point4D structure.

In XAML, the delimiter between the values of a Point4D can be either a comma or a space.

Some cultures might use the comma character as the decimal delimiter instead of the period character. XAML processing for invariant culture defaults to en-US in most XAML processor implementations, and expects the period to be the decimal delimiter. You should avoid using the comma character as the decimal delimiter if specifying a Point4D in XAML, because that will clash with the string type conversion of a Point4D attribute value into its components.

This example shows how to test Point4D structures for equality and inequality.

The following code illustrates how to test Point4D structures for equality and inequality using the Point4D equality methods. The Point4D structures are tested for equality using the overloaded == operator, then for inequality using the overloaded != operator, and finally a Point3D structure and a Point4D structure are checked for equality using the static Equals method.

// instantiate Points
Point4D point4D1 = new Point4D();
Point4D point4D2 = new Point4D(15, 40, 60, 75);
Point3D point3D1 = new Point3D(15, 40, 60);

// result variables
Boolean areEqual;
Boolean areNotEqual;
String stringResult;

// defining x,y,z,w of point1
point4D1.X = 10;
point4D1.Y = 5;
point4D1.Z = 1;
point4D1.W = 4;

// checking if Points are equal
areEqual = point4D1 == point4D2;

// areEqual is False 

// checking if Points are not equal
areNotEqual = point4D1 != point4D2;
// areNotEqual is True 

if (Point4D.Equals(point4D1, point3D1))
    // the if condition is not true, so this block will not execute
    stringResult = "Both objects are Point4D structures and they are equal";

    // the if condition is false, so this branch will execute
    stringResult = "Parameters are not both Point4D strucutres, or they are but are not equal";

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0