-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to customize Expander control by overriding resource keys #6688
Comments
ExpanderChevronGlyphSize is referenced via static resource
We should change this resource to be referenced via theme resource so that it can be overriden at the page level. @AndradeL are there other resources with this control that you want to override and can't? |
I've already found a way to fix this problem on my code by customizing a copy of the ControlTemplate, however I believe it's important to have it consistent with documentation specified on https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.expander?view=winui-2.6#remarks |
@AndradeL can you please give me a sample? I try to remove the padding but with no succes.. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Describe the bug
The Expander class API guide recommends modifying specific resource keys for customizing the look of the Expander:
https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.expander?view=winui-2.6#remarks
When trying to do so by setting: <x:Double x:Key="ExpanderChevronGlyphSize">20</x:Double> for example, nothing changes.
Some of the resources actually works, like setting
I've tried setting this properties both on the App scope and in a Page scope but none of them work.
Steps to reproduce the bug
Expected behavior
The UI elements of the Expander that reference the resource keys should change properly, as specified in its API reference.
Screenshots
Default chevron style is the same as when trying to customize:
NuGet package version
Microsoft.UI.Xaml 2.6.2
Windows app type
Device form factor
No response
Windows version
May 2021 Update (19043)
Additional context
Processor Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 1.99 GHz
Installed RAM 24.0 GB (23.9 GB usable)
System type 64-bit operating system, x64-based processor
Edition Windows 10 Enterprise
Version 21H2
OS build 19044.1466
Experience Windows Feature Experience Pack 120.2212.3920.0
The text was updated successfully, but these errors were encountered: