3 types derived from Brush
Microsoft.Maui.Controls (3)
GradientBrush.cs (1)
10 public abstract class GradientBrush : Brush
ImageBrush.cs (1)
4 class ImageBrush : Brush
SolidColorBrush.cs (1)
9 public class SolidColorBrush : Brush
102 references to Brush
Microsoft.Maui.Controls (98)
BarElement.cs (2)
14 BindableProperty.Create(nameof(IBarElement.BarBackground), typeof(Brush), typeof(IBarElement), default(Brush));
BindableObjectExtensions.cs (4)
193 Brush defaultDark, 194 Brush defaultLight, 209 return (Brush)outerLight != defaultLight || (Brush)outerDark != defaultDark;
Border\Border.cs (5)
94 BindableProperty.Create(nameof(Stroke), typeof(Brush), typeof(Border), null, 108 var stroke = Stroke; 127 var stroke = Stroke; 173 public Brush? Stroke 176 get { return (Brush?)GetValue(StrokeProperty); }
Brush\Brush.cs (6)
14 public static implicit operator Brush(Paint paint) 54 public static implicit operator Paint(Brush brush) 99 public static Brush Default => defaultBrush ??= new(null); 101 public static implicit operator Brush(Color color) => new SolidColorBrush(color); 109 /// Indicates whether the specified <see cref="Brush"/> is <see langword="null"/> or empty. 112 public static bool IsNullOrEmpty(Brush brush)
Brush\BrushTypeConverter.cs (3)
44 return (Brush)colorValue; 48 return (Brush)paintValue; 86 if (value is Brush brush && destinationType == typeof(Paint))
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (2)
515 Brush background = Element.Background; 517 if (!Brush.IsNullOrEmpty(background))
Compatibility\Handlers\iOS\FrameRenderer.cs (1)
125 if (!Brush.IsNullOrEmpty(element.Background))
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (2)
92 protected override void SetBackground(Brush brush) 99 if (!Brush.IsNullOrEmpty(brush))
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (1)
718 var barBackgroundBrush = NavPage.BarBackground;
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
234 var brush = _shellContext.Shell.FlyoutBackground;
Compatibility\Handlers\Shell\iOS\ShellFlyoutRenderer.cs (3)
22 _backdropBrush = Brush.Default; 129 Brush _backdropBrush; 318 if (Brush.IsNullOrEmpty(_backdropBrush))
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (1)
364 var barBackground = tabbed.BarBackground;
Compatibility\Handlers\VisualElementRenderer.cs (1)
191 protected virtual void SetBackground(Brush brush)
Frame\Frame.cs (1)
102 return new Shadow() { Radius = 5, Opacity = 0.8f, Offset = new Point(0, 0), Brush = Brush.Black };
IBarElement.cs (1)
9 Brush BarBackground { get; }
IBorderElement.cs (1)
14 Brush Background { get; }
NavigationPage\NavigationPage.cs (2)
100 public Brush BarBackground 102 get => (Brush)GetValue(BarElement.BarBackgroundProperty);
NavigationPage\NavigationPageToolbar.cs (1)
239 if (Brush.IsNullOrEmpty(BarBackground) &&
Page\Page.cs (1)
837 if (!Brush.IsNullOrEmpty(Background))
Platform\iOS\Extensions\BrushExtensions.cs (4)
18 public static void UpdateBackground(this UIView control, Brush brush) 28 if (Brush.IsNullOrEmpty(brush)) 40 public static CALayer GetBackgroundLayer(this UIView control, Brush brush) 114 public static UIImage GetBackgroundImage(this UIView control, Brush brush)
RadioButton\RadioButton.cs (1)
480 Fill = Brush.Transparent,
Shadow.cs (4)
15 public static readonly BindableProperty BrushProperty = BindableProperty.Create(nameof(Brush), typeof(Brush), typeof(Shadow), Brush.Black); 34 public Brush Brush 36 get { return (Brush)GetValue(BrushProperty); }
Shapes\Shape.cs (14)
34 BindableProperty.Create(nameof(Fill), typeof(Brush), typeof(Shape), null, 48 BindableProperty.Create(nameof(Stroke), typeof(Brush), typeof(Shape), null, 90 public Brush Fill 93 get { return (Brush)GetValue(FillProperty); } 97 public Brush Stroke 100 get { return (Brush)GetValue(StrokeProperty); } 195 var fill = Fill; 214 var fill = Fill; 230 var stroke = Stroke; 249 var stroke = Stroke; 470 class WeakBrushChangedProxy : WeakEventProxy<Brush, EventHandler> 484 public override void Subscribe(Brush source, EventHandler handler) 486 if (TryGetSource(out var s)) 503 if (TryGetSource(out var s))
Shell\Shell.cs (10)
428 BindableProperty.CreateAttached(nameof(FlyoutBackdrop), typeof(Brush), typeof(Shell), Brush.Default, 599 public static Brush GetFlyoutBackdrop(BindableObject obj) => (Brush)obj.GetValue(FlyoutBackdropProperty); 606 public static void SetFlyoutBackdrop(BindableObject obj, Brush value) => obj.SetValue(FlyoutBackdropProperty, value); 1090 BindableProperty.Create(nameof(FlyoutBackground), typeof(Brush), typeof(Shell), SolidColorBrush.Default, BindingMode.OneTime); 1347 public Brush FlyoutBackground 1349 get => (Brush)GetValue(FlyoutBackgroundProperty); 1356 public Brush FlyoutBackdrop 1358 get => (Brush)GetValue(FlyoutBackdropProperty);
Shell\ShellAppearance.cs (8)
39 Brush[] _brushArray = new Brush[s_ingestBrushArray.Length]; 73 public Brush FlyoutBackdrop => _brushArray[0]; 95 _brushArray[i] = Brush.Default; 115 if (!EqualityComparer<Brush>.Default.Equals(_brushArray[i], appearance._brushArray[i])) 136 hashCode = hashCode * -1521134295 + EqualityComparer<Brush>.Default.GetHashCode(_brushArray[i]); 159 var brushDataSet = pivot.GetValues<Brush>(s_ingestBrushArray); 162 if (Brush.IsNullOrEmpty(_brushArray[i]) && brushDataSet[i].IsSet)
SwipeView\SwipeView.Mapper.cs (2)
18 var contentBackgroundIsNull = Brush.IsNullOrEmpty(swipeView.Content.Background); 23 if (!Brush.IsNullOrEmpty(swipeView.Background))
TabbedPage\TabbedPage.cs (2)
36 public Brush BarBackground 38 get => (Brush)GetValue(BarElement.BarBackgroundProperty);
Toolbar\Toolbar.cs (2)
17 Brush _barBackground; 39 public Brush BarBackground { get => _barBackground; set => SetProperty(ref _barBackground, value); }
VisualElement\VisualElement.cs (12)
279 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(Brush), typeof(VisualElement), Brush.Default, 313 var background = Background; 331 var background = Background; 344 class WeakBackgroundChangedProxy : WeakEventProxy<Brush, EventHandler> 358 public override void Subscribe(Brush source, EventHandler handler) 360 if (TryGetSource(out var s)) 377 if (TryGetSource(out var s)) 556 /// Gets or sets the <see cref="Brush"/> which will be used to fill the background of an element. This is a bindable property. 559 public Brush Background 561 get { return (Brush)GetValue(BackgroundProperty); } 1818 if (!Brush.IsNullOrEmpty(Background))
Microsoft.Maui.Controls.Build.Tasks (1)
CompiledConverters\BrushTypeConverter.cs (1)
43 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Brush));
Microsoft.Maui.Controls.Compatibility (3)
Tizen\Extensions\BrushExtensions.cs (2)
47 var brush = element.Background; 48 if (Brush.IsNullOrEmpty(brush))
Tizen\Renderers\VisualElementRenderer.cs (1)
578 if (initialize && Element.Background.Equals(Brush.Default))