Reusing common Interactions? #3670
-
|
I have a ViewModel with an Interaction<Unit, string>, which is responsible of opening a FolderDialog. I "invoke" this Interaction via a Command bound to my view. I have two commands that i want to use this interaction with: But i realized that the getDirectory-Interaction returns the same string when i call it in the second command! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Interactions end up "walking" up the stack of registered interactions - if you want to reuse a common one, you can declare it in a common parent View of both elements |
Beta Was this translation helpful? Give feedback.
Interactions end up "walking" up the stack of registered interactions - if you want to reuse a common one, you can declare it in a common parent View of both elements