Size3D Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Data structure that describes the size of a three-dimensional object.
public value class Size3D : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Size3DConverter))]
[System.Serializable]
public struct Size3D : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Size3DConverter))]
public struct Size3D : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Size3DConverter))>]
[<System.Serializable>]
type Size3D = struct
interface IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Size3DConverter))>]
type Size3D = struct
interface IFormattable
Public Structure Size3D
Implements IFormattable
- Inheritance
- Attributes
- Implements
Examples
This example shows how to determine if two Size3D structures are equal using the Size3D static Equals method.
The following code illustrates how to check Size3D structures for equality. The Size3D structures are declared and assigned values. The Equals method is then used to determine if the two structures are equal.
private bool size3DEqualityExample()
{
// Checks if two Size3D structures are equal using the static Equals method.
// Returns a Boolean.
// Declaring Size3D structure without initializing x,y,z values
Size3D size1 = new Size3D();
// Delcaring Size3D structure and initializing x,y,z values
Size3D size2 = new Size3D(5, 10, 15);
Boolean areEqual;
// Assigning values to size1
size1.X = 2;
size1.Y = 4;
size1.Z = 6;
// checking for equality
areEqual = Size3D.Equals(size1, size2);
// areEqual is False
return areEqual;
}
Remarks
Size3D and Rect3D are not typically used in XAML, because no settable properties exist in the WPF 3D object model that use those types.
Constructors
Size3D(Double, Double, Double) |
Initializes a new instance of the Size3D structure. |
Properties
Empty |
Gets a value that represents an empty Size3D structure. |
IsEmpty |
Gets a value that indicates whether this Size3D structure is empty. |
X | |
Y | |
Z |
Methods
Equals(Object) |
Determines whether the specified object is a Size3D structure and whether the X, Y and Z properties of the specified Object are equal to the X, Y and Z properties of this Size3D structure. |
Equals(Size3D) |
Compares two Size3D structures for equality. |
Equals(Size3D, Size3D) |
Compares two Size3D structures for equality. Two Size3D structures are equal if the values of their X, Y, and Z properties are the same. |
GetHashCode() |
Returns a hash code for this Size3D structure. |
Parse(String) |
Converts a String representation of a three-dimensional size structure into the equivalent Size3D structure. |
ToString() | |
ToString(IFormatProvider) |
Operators
Equality(Size3D, Size3D) |
Compares two Size3D structures for equality. Two Size3D structures are equal if the values of their X, Y, and Z properties are the same. |
Explicit(Size3D to Point3D) | |
Explicit(Size3D to Vector3D) | |
Inequality(Size3D, Size3D) |
Compares two Size3D structures for inequality. Two Size3D structures are not equal if the values of their X, Y and Z properties are different. |
Explicit Interface Implementations
IFormattable.ToString(String, IFormatProvider) |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. For a description of this member, see ToString(String, IFormatProvider). |
Applies to
.NET