Class Rectangle
Draws a rectangle shape, which can have a stroke and a fill.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Shapes
Assembly: OpenSilver.dll
Syntax
public class Rectangle : Shape
Examples
Rectangle rect = new Rectangle() { Width = 60, Height = 30, Fill = new SolidColorBrush(Windows.UI.Colors.Blue) };
MyStackPanel.Children.Add(rect);
Fields
| Improve this Doc View SourceRadiusXProperty
Identifies the RadiusX dependency property.
Declaration
public static readonly DependencyProperty RadiusXProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RadiusYProperty
Identifies the RadiusY dependency property.
Declaration
public static readonly DependencyProperty RadiusYProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceRadiusX
Gets or sets the x-axis radius of the ellipse that is used to round the corners of the rectangle.
Declaration
public double RadiusX { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
RadiusY
Gets or sets the y-axis radius of the ellipse that is used to round the corners of the rectangle. The default is 0.
Declaration
public double RadiusY { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceCreateDomElement(Object, out Object)
Declaration
public override object CreateDomElement(object parentRef, out object domElementWhereToPlaceChildren)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parentRef | |
System.Object | domElementWhereToPlaceChildren |
Returns
Type | Description |
---|---|
System.Object |
Overrides
| Improve this Doc View SourceRedraw()
Declaration
protected override void Redraw()