System.Windows.Media Namesp ...


.NET Framework Class Library for Silverlight
RectangleGeometry Class

Describes a two-dimensional rectangular geometry.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
Syntax

Visual Basic (Declaration)
Public NotInheritable Class RectangleGeometry _
    Inherits Geometry
Visual Basic (Usage)
Dim instance As RectangleGeometry
C#
public sealed class RectangleGeometry : Geometry
XAML Object Element Usage
<RectangleGeometry .../>
Examples

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)

ms635495.JOLT_local_-1281615263_0b86e745-609f-4fc5-a284-7cefe2b9d0ce(en-us,VS.95).gif
XAML
<Canvas>
  <Path Fill="LemonChiffon" Stroke="Black" StrokeThickness="1">
    <Path.Data>
      <RectangleGeometry Rect="50,50,25,25" />
    </Path.Data>
  </Path> 
</Canvas>
Inheritance Hierarchy

System..::.Object
  System.Windows..::.DependencyObject
    System.Windows.Media..::.Geometry
      System.Windows.Media..::.RectangleGeometry
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources

Tags :


Page view tracker