Class Rectangle
Represents a rectangle with optional rounded corners.
public class Rectangle : Shape, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
Rectangle
- Implements
- Inherited Members
- Extension Methods
Constructors
Rectangle()
public Rectangle()
Fields
RadiusXProperty
Defines the RadiusX property.
public static readonly StyledProperty<double> RadiusXProperty
Field Value
RadiusYProperty
Defines the RadiusY property.
public static readonly StyledProperty<double> RadiusYProperty
Field Value
Properties
RadiusX
Gets or sets the radius on the X-axis used to round the corners of the rectangle. Corner radii are represented by an ellipse so this is the X-axis width of the ellipse.
public double RadiusX { get; set; }
Property Value
Remarks
RadiusY
Gets or sets the radius on the Y-axis used to round the corners of the rectangle. Corner radii are represented by an ellipse so this is the Y-axis height of the ellipse.
public double RadiusY { get; set; }
Property Value
Remarks
Methods
CreateDefiningGeometry()
Creates the shape's defining geometry.
protected override Geometry CreateDefiningGeometry()
Returns
MeasureOverride(Size)
Measures the control and its child elements as part of a layout pass.
protected override Size MeasureOverride(Size availableSize)
Parameters
availableSize
SizeThe size available to the control.
Returns
- Size
The desired size for the control.