How to add handler to event of controls in Template of a TemplatedControl? #19380
Unanswered
jyswjjgdwtdtj
asked this question in
Q&A
Replies: 1 comment
-
With one level of nesting, you simply define the Avalonia/src/Avalonia.Controls/ToggleSwitch.cs Lines 187 to 202 in cd05ff8 Multiple levels of nesting is usually a design flaw. As in, Custom Control -> Another Templated Control -> Button. If "Another Templated Control" doesn't expose an event for this, you shouldn't be digging. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
For example I want to bind a method to the Click event of my button (please don't tell me to use Command, for this way is not general for all the events), and the button is multiple nested by serveral templates, including datatemplate, controltemplate.
Beta Was this translation helpful? Give feedback.
All reactions