Cette documentation est archivée et n’est pas conservée.

Size, structure

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

Espace de noms: System.Windows
Assembly : WindowsBase (dans windowsbase.dll)
Espace de noms XML :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[SerializableAttribute] 
[TypeConverterAttribute(typeof(SizeConverter))] 
public struct 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.

protected override Size MeasureOverride(Size availableSize)
{
    Size childSize = availableSize;
    foreach (UIElement child in InternalChildren)
    {
        child.Measure(childSize);
    }
    return availableSize;
}

Davantage de 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.

Les membres statiques publics (Shared en Visual Basic) de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0
Afficher: