Describes a two-dimensional rectangular geometry.
The RectangleGeometry class has these types of members:
The RectangleGeometry class has these constructors.
|RectangleGeometry||Initializes a new instance of the RectangleGeometry class and creates a rectangle with zero area.|
The RectangleGeometry class has these methods. It also inherits methods from the Object class.
|ClearValue||Clears the local value of a dependency property. (Inherited from DependencyObject)|
|GetAnimationBaseValue||Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)|
|GetValue||Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)|
|ReadLocalValue||Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)|
|SetValue||Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)|
The RectangleGeometry class has these properties.
|Read-only||Gets a Rect that specifies the axis-aligned bounding box of the Geometry. (Inherited from Geometry)|
|Read-only||Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)|
|Read/write||Gets or sets the dimensions of the rectangle.|
|Read-only||Identifies the Rect dependency property.|
|Read/write||Gets or sets the Transform object applied to a Geometry. (Inherited from Geometry)|
This 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.
<Canvas> <Path Fill="LemonChiffon" Stroke="Red" StrokeThickness="3"> <Path.Data> <RectangleGeometry Rect="50,50,25,25" /> </Path.Data> </Path> </Canvas>
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Build date: 11/16/2013