You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you remove the BasedOn="{StaticResource DefaultExpanderStyle}" from the custom Expander style in the attached sample app, it renders properly on Windows but does not display properly on other platforms
counter-intuitively, it seems that BasedOn is to be expected?
For system controls that use WinUI styles (Windows.UI.Xaml.Controls namespace), set BasedOn="{StaticResource Default<ControlName>Style}", where <ControlName> is the name of the control. [...]
For WinUI 2 controls (Microsoft.UI.Xaml.Controls namespace), the default style is defined in the metadata, so omit BasedOn.
-- https://learn.microsoft.com/en-us/windows/apps/design/style/xaml-styles#avoid-restyling-controls
Originally posted by @kazo0 in #17774 (reply in thread)
If you remove the
BasedOn="{StaticResource DefaultExpanderStyle}"
from the customExpander
style in the attached sample app, it renders properly on Windows but does not display properly on other platformsReproWinStyle.zipWithout BasedOn (Windows):
Without BasedOn (Android):
With BasedOn (Android):
The text was updated successfully, but these errors were encountered: