Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: View model member exposed as Action<T> #574

Closed
LyndonGingerich opened this issue Jul 12, 2023 · 2 comments
Closed

Feature request: View model member exposed as Action<T> #574

LyndonGingerich opened this issue Jul 12, 2023 · 2 comments

Comments

@LyndonGingerich
Copy link
Contributor

When working with Elmish.WPF from WPF C# code-behind, I dislike using ICommand because it is untyped. OneWayToSourceT bindings are quite helpful, but sometimes I want to pass the call to a different part of my app as an Action<T>. Then I have to create a lambda manually that takes the new value and sets it. What would you think of implementing a setter binding type that is exposed directly as an Action<T>?

@LyndonGingerich
Copy link
Contributor Author

@marner2 Says that using code-behind is a hack and we shouldn't adjust Elmish.WPF to facilitate it. :P

@TysonMN
Copy link
Member

TysonMN commented Jul 13, 2023

Indeed. Typically use code behind only if that is the only solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants