Button OnClicked Extension #124
Closed
Matthew-Collins
started this conversation in
New Feature Discussions
Replies: 2 comments 1 reply
-
I like it! The concerns I have are inducing memory leaks, and unsubscribing from the event. The same functionality is currently allowed in XAML and doesn't seem to cause any complaints. Maybe we could implement it the same way that the .NET MAUI team wires up events subscribed in XAML? <Button Clicked="HandleClicked" /> XAML also doesn't allow users to unsubscribe, so perhaps that shouldn't be a blocker. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 |
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
-
I'm new to Maui and C# (VisualBasic developer 30 years) and struggled to understand how to wire up a click event... considered going back to XAML (found more support online) but eventually found the solution on one of your YouTube videos https://youtu.be/yS8XmAQi3YY?t=357 5:49, using the .Invoke().
My suggestion is to add a little extension to make this use beautiful (see .OnClicked).
Example Usage:
Extension Code:
Beta Was this translation helpful? Give feedback.
All reactions