Size3D.IsEmpty Property

Gets a value that indicates whether this Size3D structure is empty.

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

public bool IsEmpty { get; }

Property Value

Type: System.Boolean
true if the Size3D structure is empty; otherwise, false. The default is false.

A Size3D structure with X, Y, and Z values set to 0 is not empty. An empty Size3D structure has X, Y, and Z values set to negative infinity. This is the only time a Size3D structure can have negative values.

The following example shows how to check if a Size3D structure is empty.

                        // Checks if a Size3D structure is empty 
                        // Returns Boolean

                        Size3D size1 = new Size3D(0, 0, 0);
                        Boolean isEmpty;

                        isEmpty = size1.IsEmpty;
                        // isEmpty is False  

                        // Displaying Results
                        syntaxString = "isEmpty = size1.IsEmpty;";
                        resultType = "Boolean";
						operationString = "Checking if a Size3D structure is empty";
                        ShowResults(isEmpty.ToString(), syntaxString, resultType, operationString);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft