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.
Visual Studio support for .NET Multi-platform App UI (.NET MAUI) is currently in preview. This content relates to a pre-release product that may be substantially modified before it's released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
SolidColorBrush, which paints an area with a solid color. For more information, see Solid color brushes.
LinearGradientBrush, which paints an area with a linear gradient. For more information, see Linear gradient brushes.
RadialGradientBrush, which paints an area with a radial gradient. For more information, see Radial gradient brushes.
Instances of these brush types can be assigned to the
Fill properties of a
Stoke property of a
Brush property of a
Shadow, and the
Background property of a
VisualElement.Background property enables brushes to be used as the background in any control.
Brush class also has an
IsNullOrEmpty method that returns a
bool that represents whether the brush is defined or not.
Submit and view feedback for