DrawRectangle(IBrush, IPen, RoundedRect, BoxShadows) Method
Draws a rectangle with the specified Brush and Pen.
Definition
Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public void DrawRectangle(
IBrush? brush,
IPen? pen,
RoundedRect rrect,
BoxShadows boxShadows = default
)
Public Sub DrawRectangle (
brush As IBrush,
pen As IPen,
rrect As RoundedRect,
Optional boxShadows As BoxShadows = Nothing
)
member DrawRectangle :
brush : IBrush *
pen : IPen *
rrect : RoundedRect *
?boxShadows : BoxShadows
(* Defaults:
let _boxShadows = defaultArg boxShadows new BoxShadows()
*)
-> unit
Parameters
- IBrush
- The brush used to fill the rectangle, or
null
for no fill. - IPen
- The pen used to stroke the rectangle, or
null
for no stroke. - RoundedRect
- The rectangle bounds.
- BoxShadows (Optional)
- Box shadow effect parameters
Remarks
The brush and the pen can both be null. If the brush is null, then no fill is performed. If the pen is null, then no stoke is performed. If both the pen and the brush are null, then the drawing is not visible.
See Also
Reference
DrawingContext Class
DrawRectangle Overload
Avalonia.Media Namespace