Code Quality: Resolve some of AOT warnings in Files.App.Controls#18458
Open
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
Open
Code Quality: Resolve some of AOT warnings in Files.App.Controls#184580x5bfa wants to merge 1 commit intofiles-community:mainfrom
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces XAML AOT/trimming warnings in Files.App.Controls by replacing several template-time Binding expressions with TemplateBinding in shared control templates. It fits into the controls library work tracked under #4180, specifically the effort to improve code quality and runtime compatibility without refactoring the larger SidebarStyles surface yet.
Changes:
- Replaced templated-parent bindings with
TemplateBindinginSamplePaneltemplate content/header bindings. - Updated
OmnibarandOmnibarModetemplates to useTemplateBindingfor padding, content, tooltips, and accessibility names. - Updated
BreadcrumbBartemplate bindings for root content and repeater source/template wiring.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Files.App.Controls/SamplePanel/SamplePanel.xaml |
Simplifies SamplePanel template bindings for header, main content, and side content. |
src/Files.App.Controls/Omnibar/Omnibar.xaml |
Reworks Omnibar/OmnibarMode template bindings to reduce AOT warnings in the main control template. |
src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml |
Switches BreadcrumbBar root item and repeater bindings to template bindings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| x:Name="PlaceholderTextContentPresenter" | ||
| VerticalAlignment="Center" | ||
| Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}" | ||
| Foreground="{TemplateBinding PlaceholderForeground}" |
Member
Author
There was a problem hiding this comment.
It's alright, we don't set PlaceholderForeground here.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolved / Related Issues
Steps used to test these changes
Here's the latest build log:
We now only have AOT warnings that come from SidebarStyles. We cannot fix this in this PR because it requires lots of refactoring to resolve AOT warnings.