Fix XAML compiled binding warnings in DeviceTests.Runners by adding x:DataType attributes#30219
Merged
Fix XAML compiled binding warnings in DeviceTests.Runners by adding x:DataType attributes#30219
Conversation
Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix warnings on DeviceTests.Runners
Fix XAML compiled binding warnings in DeviceTests.Runners by adding x:DataType attributes
Jun 25, 2025
daltzctr
reviewed
Jun 25, 2025
src/TestUtils/src/DeviceTests.Runners/VisualRunner/Pages/TestAssemblyPage.xaml
Show resolved
Hide resolved
mattleibow
approved these changes
Jun 25, 2025
mattleibow
approved these changes
Jun 25, 2025
StephaneDelcroix
approved these changes
Jun 26, 2025
Member
|
/azp run |
mattleibow
approved these changes
Jul 22, 2025
|
Azure Pipelines successfully started running 3 pipeline(s). |
PureWeen
approved these changes
Aug 15, 2025
rmarinho
added a commit
that referenced
this pull request
Aug 19, 2025
* Update bug-report.yml 9.0.100 SR10 (#31163) * Update ShellItemRenderer.cs (#31170) Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com> * [create-pull-request] automated change (#31181) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix XAML compiled binding warnings in DeviceTests.Runners by adding x:DataType attributes (#30219) * Initial plan * Fix XAML compiled binding warnings by adding x:DataType attributes Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com> * Move externally linked XML API docs to inline source code documentation (#30313) * Initial plan * Convert first batch of XML docs to inline documentation Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Convert second batch of XML docs to inline documentation Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Convert third batch of XML docs to inline documentation Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> # Conflicts: # src/Controls/src/Core/BoxView/BoxView.cs * Convert fourth batch (50 files) of XML docs to inline documentation Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Convert fifth batch (100 files) of XML docs to inline documentation - Major milestone! Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Fix documentation issues - remove T: prefixes, fix generic types, replace "To be added", spell check Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Fix internal use documentation and CS1573 warnings Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Delete unused XML documentation files from converted classes Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * Delete 76 truly unreferenced XML documentation files Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> * [create-pull-request] automated change (#31197) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [ci] Fix merge * Update TestAssemblyPage.xaml --------- Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com> Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
This PR resolves 37 XC0022 warnings in the DeviceTests.Runners project by adding proper
x:DataTypeattributes to enable compiled bindings for improved runtime performance.Problem
The DeviceTests.Runners project was generating numerous XC0022 warnings:
These warnings were appearing across three XAML files:
HomePage.xaml- 16 warningsTestAssemblyPage.xaml- 20 warningsTestResultPage.xaml- 8 warningsSolution
Added appropriate
x:DataTypeattributes to enable compiled bindings:HomePage.xaml
xmlns:localnamespace referencex:DataType="local:HomeViewModel"to root ContentPagex:DataType="local:TestAssemblyViewModel"to CollectionView DataTemplatex:DataType="CollectionView"to binding with explicit Source referenceTestAssemblyPage.xaml
x:DataType="local:TestAssemblyViewModel"to root ContentPagex:DataType="local:TestCaseViewModel"to CollectionView DataTemplatex:DataType="CollectionView"to binding with explicit Source referenceTestResultPage.xaml
xmlns:localnamespace referencex:DataType="local:TestResultViewModel"to root ContentPageResults
The changes follow .NET MAUI best practices for compiled bindings as documented in the official guidance.
Fixes #30214.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.