X Property
Collapse the table of content
Expand the table of content

Size3D.X Property


Gets or sets the X value of this Size3D structure.

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

Public Property X As Double

Property Value

Type: System.Double

The X value of this Size3D structure. The default value is 0.

The X, Y, and Z values must be non-negative.

Size3D and Rect3D are not typically used in XAML, because no settable properties exist in the WPF 3D object model that use those types.

The following example shows how to check if two Size3D structures are equal. It also shows how to assign values to a Size3D structure when the structure is being declared and after the structure has been declared.

' Checks if two Size3D structures are equal using the static Equals method. 
' Returns a Boolean.

' Declaring Size3D structure without initializing x,y,z values
Dim size1 As New Size3D()

' Declaring Size3D structure and initializing x,y,z values
Dim size2 As New Size3D(5, 10, 15)
Dim areEqual As Boolean

' Assigning values to size1
size1.X = 2
size1.Y = 4
size1.Z = 6

' checking for equality
areEqual = Size3D.Equals(size1, size2)

' areEqual is False

' Displaying Results
syntaxString = "areEqual = Size3D.Equals(size1, size2)"
resultType = "Boolean"
operationString = "Checking if two Size3D structures are equal"
ShowResults(areEqual.ToString(), syntaxString, resultType, operationString)

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft