Browse sample. Browse the sample

A .NET Multi-platform App UI (.NET MAUI) brush enables you to paint an area, such as the background of a control, using different approaches.

The Brush class is an abstract class that paints an area with its output. Classes that derive from Brush describe different ways of painting an area. The following list describes the different brush types available in .NET MAUI:

Instances of these brush types can be assigned to the Stroke and Fill properties of a Shape, the Stroke property of a Border, the Brush property of a Shadow, and the Background property of a VisualElement.


The VisualElement.Background property enables brushes to be used as the background in any control.

The Brush class also has an IsNullOrEmpty method that returns a bool that represents whether the brush is defined or not.