Why are my buttons not disabled or rendered like that if command cant be executed #17152
-
Buttons have the same apperence even if the command cant be executed (Dark Mode) |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
Button is disabling itself, when Command either is null (can't be reached) or when Command.CanExecute(param) is false. |
Beta Was this translation helpful? Give feedback.
-
yea ok, but its not the case for my buttons ? (: |
Beta Was this translation helpful? Give feedback.
-
@trashhacker please provide a very minimal sample. Need to see code to help further |
Beta Was this translation helpful? Give feedback.
-
hmm maybe the problem is general couse i have the same problem in a treeview |
Beta Was this translation helpful? Give feedback.
You're missing BasedOn in the ControlTheme
BasedOn="{StaticResource {x:Type MenuItem}}"