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
117 references to Brush
Microsoft.Maui.Controls (81)
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))
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)
839 if (!Brush.IsNullOrEmpty(Background))
RadioButton\RadioButton.cs (1)
473 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)
282 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(Brush), typeof(VisualElement), Brush.Default, 316 var background = Background; 334 var background = Background; 347 class WeakBackgroundChangedProxy : WeakEventProxy<Brush, EventHandler> 361 public override void Subscribe(Brush source, EventHandler handler) 363 if (TryGetSource(out var s)) 380 if (TryGetSource(out var s)) 559 /// Gets or sets the <see cref="Brush"/> which will be used to fill the background of an element. This is a bindable property. 562 public Brush Background 564 get { return (Brush)GetValue(BackgroundProperty); } 1821 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 (35)
iOS\Renderers\BoxRenderer.cs (3)
101 protected override void SetBackground(Brush brush) 106 if (Brush.IsNullOrEmpty(brush)) 109 if (Brush.IsNullOrEmpty(brush))
iOS\Renderers\ButtonRenderer.cs (4)
87 Brush brush = Element.Background; 89 if (!Brush.IsNullOrEmpty(brush)) 162 protected override void SetBackground(Brush brush) 169 if (!Brush.IsNullOrEmpty(brush))
iOS\Renderers\CarouselPageRenderer.cs (1)
376 Brush background = Element.Background;
iOS\Renderers\FrameRenderer.cs (1)
93 if (!Brush.IsNullOrEmpty(Element.Background))
iOS\Renderers\LabelRenderer.cs (1)
339 protected override void SetBackground(Brush brush)
iOS\Renderers\ListViewRenderer.cs (2)
121 protected override void SetBackground(Brush brush) 128 if (!Brush.IsNullOrEmpty(brush))
iOS\Renderers\NavigationRenderer.cs (2)
690 var barBackgroundBrush = NavPage.BarBackground; 705 var barBackgroundBrush = NavPage.BarBackground;
iOS\Renderers\PageRenderer.cs (2)
479 Brush background = Element.Background; 481 if (!Brush.IsNullOrEmpty(background))
iOS\Renderers\PhoneFlyoutPageRenderer.cs (2)
344 Brush background = Element.Background; 346 if (!Brush.IsNullOrEmpty(background))
iOS\Renderers\RefreshViewRenderer.cs (1)
102 protected override void SetBackground(Brush brush)
iOS\Renderers\ScrollViewRenderer.cs (1)
320 Brush background = Element.Background;
iOS\Renderers\SearchBarRenderer.cs (1)
171 protected override void SetBackground(Brush brush)
iOS\Renderers\SwipeViewRenderer.cs (3)
174 protected override void SetBackground(Brush brush) 176 Brush background = Element.Background; 178 if (Brush.IsNullOrEmpty(background))
iOS\Renderers\TabbedRenderer.cs (1)
377 var barBackground = Tabbed.BarBackground;
iOS\Renderers\TabletFlyoutPageRenderer.cs (2)
509 Brush background = Element.Background; 511 if (!Brush.IsNullOrEmpty(background))
iOS\Shapes\ShapeRenderer.cs (4)
251 Brush _stroke; 252 Brush _fill; 321 public void UpdateFill(Brush fill) 327 public void UpdateStroke(Brush stroke)
iOS\ViewRenderer.cs (3)
223 protected override void SetBackground(Brush brush) 285 Brush brush = Element.Background; 287 if (!Brush.IsNullOrEmpty(brush))
iOS\VisualElementRenderer.cs (1)
397 protected virtual void SetBackground(Brush brush)