Describes a two-dimensional rectangular geometry.
Namespace:
System.Windows.Media
Assembly:
System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public NotInheritable Class RectangleGeometry _
Inherits Geometry
Dim instance As RectangleGeometry
public sealed class RectangleGeometry : Geometry
XAML Object Element Usage
The following example shows how to create and render a RectangleGeometry object. The position and dimensions of the rectangle are defined by a Rect property value, provided as an attribute. The position is 50,50 and the height and width are both 25, which creates a square. The following illustration shows the output of the example.
A RectangleGeometry drawn at (50,50)
<Canvas>
<Path Fill="LemonChiffon" Stroke="Black" StrokeThickness="1">
<Path.Data>
<RectangleGeometry Rect="50,50,25,25" />
</Path.Data>
</Path>
</Canvas>
System..::.Object
System.Windows..::.DependencyObject
System.Windows.Media..::.Geometry
System.Windows.Media..::.RectangleGeometry
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference
Other Resources