Replies: 4 comments 7 replies
-
Off-topic: github pools could be way better, if I was able to include rich text content right in the options. |
Beta Was this translation helpful? Give feedback.
-
Interesting, going to think about this some more for sure |
Beta Was this translation helpful? Give feedback.
-
Option 8. A new
The following would handle the event on the VM and use a converter to convert
I still really like the simplicity of the first option though and it covers my needs. I don't have an issue handling the event in code-behind and forwarding it into the VM, if necessary. Some thought should go into discoverability while typing these into the IDE. |
Beta Was this translation helpful? Give feedback.
-
It is not necessary to duplicate the events, just adopt the strategy I used here With the same strategy you could handle all other types of events without complicating the syntax too much. For binding the event to the VM I like this syntax: Event=“{Binding Submit(#txtBox.Text, $args.EventArgsProp.ToString())}” |
Beta Was this translation helpful? Give feedback.
-
Right now all event handlers are registered with
Direct | Bubble
strategy.But it's pretty common to have a case when Tunnel strategy is needed.
In WPF/UWP they had Preview*** prefix for events, which basically requires to duplicate all events in this way. We already went in a different path, and I personally don't like this whole idea of duplicating events.
So to avoid code-behind for each Tunnel event handler, we need some XAML support.
Here I have some ideas, but please add yours.
Note:
PointerPressed.Tunnel="{x:Static StaticClass.EventHandler}"
My current ideas:
11 votes ·
Beta Was this translation helpful? Give feedback.
All reactions