Export (0) Print
Expand All

Size Structure

Implements a structure that is used to describe the Size of an object.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[SerializableAttribute] 
[TypeConverterAttribute(typeof(SizeConverter))] 
public value class Size : IFormattable
/** @attribute SerializableAttribute() */ 
/** @attribute TypeConverterAttribute(System.Windows.SizeConverter) */ 
public final class Size extends ValueType implements IFormattable
<object property="width,height"/>
 width  A value greater than or equal to 0 that specifies the Width of the Size structure.   height  A value greater than or equal to 0 that specifies the Height of the Size structure. 

Size is particularly useful because it describes both the Height and Width of an object. Size is used extensively by the layout system to arrange and measure elements.

The following example demonstrates how to use a Size structure in code.


virtual Size MeasureOverride (Size availableSize) override 
{
   Size childSize = availableSize;
   for each (UIElement^ child in InternalChildren)
   {
      child->Measure(childSize);
   }
   return availableSize;
};

More Code

How to: Create an Elliptical Arc

This example shows how to draw an elliptical arc. To create an elliptical arc, use the PathGeometry, PathFigure, and ArcSegment classes.

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft