Replies: 3 comments 3 replies
-
Why do you do a stylekeyoverride if you want to target your custom button? That's wrong usage here. In case you wanted to base on button style, you need to use ControlTheme with BasedOn set accordingly. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, by using StyleKeyOverride you told styling subsystem, that it should use "Button" as a style key. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks Guys. Now it is working fine. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I have written code for my custom button. I have created a style for that, providing a red background color.
But that style was not applied to my custom button
To Reproduce
Step 1:
internal class CustomButton : Button
{
public CustomButton()
{
}
Step2:
<Style Selector="local|CustomButton"> </Style>Setp3:
<local:CustomButton
Width="150" Height="75" />
Expected behavior
No response
Avalonia version
11.1.0
OS
Windows
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions