Brushes
A brush is used to paint an area like any control’s background. The Brush is available in the Xamarin.forms namespace on Android, the Universal Windows Platform (UWP), iOS, macOS, and the Windows Presentation Foundation (WPF).
There are different types available in Xamarin forms to describe the brushes.
SolidColorBrush: This can be used for paints an area with a solid color, and this class derives from the Brush class. This class has an IsEmpty method that returns a bool.
LinearGradientBrush: This can be used to paints an area with a linear gradient, and the LinearGradientBrush class defines the following properties:
- StartPoint: Represent the starting two-dimensional coordinates of the linear gradient. Default values of this property are (0,0).
- EndPoint: Represent the ending two-dimensional coordinates of the linear gradient. Default values of this property are (1,1).
RadialGradientBrush: This can be used to paints an area with a radial gradient, and the RadialGradientBrush class defines the following properties:
- Center: This property is used to getting a center point of the circle for the radial gradient. (0.5,0.5) is the default value of this property.
- Radius: This property is used to getting the radius of the circle for the radial gradient. 0.5 is the default value of this property.