Skip to content

Sample: BoxView.Fill (Brush) — .NET MAUI 11 Preview 5#771

Open
davidortinau wants to merge 1 commit into
dotnet:mainfrom
davidortinau:daortin/p5-sample-boxview-fill
Open

Sample: BoxView.Fill (Brush) — .NET MAUI 11 Preview 5#771
davidortinau wants to merge 1 commit into
dotnet:mainfrom
davidortinau:daortin/p5-sample-boxview-fill

Conversation

@davidortinau

Copy link
Copy Markdown
Contributor

Adds a new sample under 11.0/UserInterface/Views/BoxView/BoxViewFill/ that demonstrates the new BoxView.Fill property added in .NET MAUI 11 Preview 5 (dotnet/maui#31789, closes dotnet/maui#2365).

BoxView.Fill is of type Brush, so SolidColorBrush, LinearGradientBrush, RadialGradientBrush, and any other brush can paint a BoxView without a custom handler — BackgroundColor still works but only handles solid colors.

What the sample shows

  • BoxView with SolidColorBrush assigned to Fill
  • BoxView with LinearGradientBrush
  • Circular BoxView with RadialGradientBrush
  • Side-by-side BackgroundColor vs Fill comparison

Note

11.0/Directory.Build.props is currently pinned to Preview 3 (MauiVersion=11.0.0-preview.3.26203.7, DotNetVersion=11.0.0-preview.3.26207.106). Restoring this sample requires the bump to Preview 5, which is normally coordinated with the preview NuGet rollout. Not blocking for merge; flagging so the first P5 sample to land knows the props bump needs to land alongside it.

Demonstrates the new BoxView.Fill property added in .NET MAUI 11
(dotnet/maui#31789, closes dotnet/maui#2365).

Includes:
- SolidColorBrush, LinearGradientBrush, RadialGradientBrush on BoxView.Fill
- Fill vs BackgroundColor comparison
- docregions for inclusion in docs/user-interface/controls/boxview.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] BoxView handlers should use Paint

1 participant