-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Styles applying order #2788
Comments
The last CustomWindow-related selector in Theme.xaml <Style Selector="l|CustomWindow[CanResize=false] /template/ Button#PART_MaximizeButton">
<Setter Property="IsVisible" Value="False" />
</Style> should hide the maximize button, when CanResize=False, but it doesn't |
You seem to be setting
Local values have a higher priority than styles, so it will always be |
By the way, this is the same behavior as WPF/UWP. We would like to improve the experience here, by setting properties in control templates with |
The workaround is to remove the property from the template and add it to another style? |
In this case you just need to remove In general, yes, you should add the default value to a style so it can be overridden, e.g. |
Styles applied to an element not in the order they are declared in xaml, or the complexity of their selectors. In exаmple "Maximize" button have to be hidden, but it is not.
AvaloniaApplication1.zip
The text was updated successfully, but these errors were encountered: