Add UseMaterial3 build property to Sandbox, HostApp and Controls.Sample Projects#33282
Merged
PureWeen merged 1 commit intodotnet:mainfrom Dec 26, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces the UseMaterial3 build property to three .NET MAUI sample and test projects, setting it to false by default. The property enables or disables Material 3 theming for Android applications. Documentation comments have been added to warn developers that changing this flag requires deleting the artifacts folder and rebuilding the entire codebase to avoid build issues.
Key Changes
- Added
<UseMaterial3>false</UseMaterial3>property to sample and test projects - Included XML comments documenting the requirement to clean artifacts and rebuild when changing the flag
- Applied consistently across Sandbox, Controls.Sample, and HostApp projects
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj |
Added UseMaterial3 property with documentation comment to the UI test host application |
src/Controls/samples/Controls.Sample/Maui.Controls.Sample.csproj |
Added UseMaterial3 property with documentation comment to the full controls sample gallery |
src/Controls/samples/Controls.Sample.Sandbox/Maui.Controls.Sample.Sandbox.csproj |
Added UseMaterial3 property with documentation comment to the sandbox testing project |
src/Controls/samples/Controls.Sample.Sandbox/Maui.Controls.Sample.Sandbox.csproj
Show resolved
Hide resolved
This was referenced Dec 24, 2025
PureWeen
approved these changes
Dec 24, 2025
kubaflo
approved these changes
Dec 25, 2025
StephaneDelcroix
pushed a commit
that referenced
this pull request
Jan 5, 2026
…mple Projects (#33282) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> This pull request introduces a new `UseMaterial3` property, set to `false` by default, across several project files. It also adds documentation comments to clarify that if this flag is changed, developers must delete the `artifacts` folder and rebuild the entire codebase to avoid build issues. Configuration and documentation updates: * Added the `<UseMaterial3>false</UseMaterial3>` property to `Maui.Controls.Sample.Sandbox.csproj`, `Maui.Controls.Sample.csproj`, and `Controls.TestCases.HostApp.csproj`, along with comments explaining the need to clean artifacts and rebuild if the flag is changed. [[1]](diffhunk://#diff-d99ae49df2f89869b0081632bce2fb57dff57b036662b3f6c8e5feeb6a66ef9dR16-R18) [[2]](diffhunk://#diff-af863121b6168780847c8835ede77fb1b01120fa3f9dd5fb48a846128f9c08fdR18-R20) [[3]](diffhunk://#diff-c73eb67a2a515f32003a6bdc59df7156d492dfcafb1b828723476f67cd439103R16-R18) Fixes # <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This pull request introduces a new
UseMaterial3property, set tofalseby default, across several project files. It also adds documentation comments to clarify that if this flag is changed, developers must delete theartifactsfolder and rebuild the entire codebase to avoid build issues.Configuration and documentation updates:
<UseMaterial3>false</UseMaterial3>property toMaui.Controls.Sample.Sandbox.csproj,Maui.Controls.Sample.csproj, andControls.TestCases.HostApp.csproj, along with comments explaining the need to clean artifacts and rebuild if the flag is changed. [1] [2] [3]Fixes #