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 enhance lex:loc with direct Binding / MVVM #241

Merged
merged 13 commits into from
May 27, 2020
Merged

Conversation

konne
Copy link
Member

@konne konne commented May 22, 2020

see Sample
that {lex:loc {Binding Foo}} is now perfect working

@konne konne changed the title Feature enhance lex:loc with direct Binding Feature enhance lex:loc with direct Binding / MVVM May 22, 2020
@konne konne requested a review from SeriousM May 22, 2020 19:44
@konne
Copy link
Member Author

konne commented May 22, 2020

@sa-he @Karnah @SeriousM please add your feedback

@konne konne added this to the 4.0 milestone May 22, 2020
@SeriousM
Copy link
Collaborator

What is Binding? I don't know it as wpf is not my area I work with since a long time. Could you explain it to me a bit?

@sa-he
Copy link

sa-he commented May 24, 2020

Great! Go for it.

@konne
Copy link
Member Author

konne commented May 24, 2020

@SeriousM

What is Binding? I don't know it as wpf is not my area I work with since a long time. Could you explain it to me a bit?
Binding is the possibility to connect the view with a property in the viewmodel. I was not aware that you are not working with wpf since a long time. I think than it will be very hard for you to fully get the idea of this tricky solution.
When you stop using wpf. should I stop contacting you about this library?

@SeriousM
Copy link
Collaborator

Well, I thought Binding is a new class in wpf and I wasn't aware that a direct usage of Binding was possible.
I stopped using wpf years ago but I'm still very interested in every change this library gets because it's still a part of my history (I'm subscribed to all of them).
Therefore I'm not the best guy to ask for wpf opinions but about this library which IMHO is not mutual exclusive.

@konne
Copy link
Member Author

konne commented May 24, 2020

@SeriousM

I wasn't aware that a direct usage of Binding was possible.
This is still not really possible but I implemented this trick that I generate Attached DependencyProperties on the fly and bind the Binding that I only can fetch via the constructor to the DPs to fetch the values.

@konne
Copy link
Member Author

konne commented May 24, 2020

@sa-he please have a look at the "full" sample. I have also extended the converter so that not only strings can be translated. If this is fine for you please close your PR #173

@SeriousM
Copy link
Collaborator

@konne i see! this is a really neat solution!
BTW, I'm very happy that the project found such a great developer like you!


public override object ProvideValue(IServiceProvider serviceProvider)
{
return new PrependTypeConverter();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here can be used "this". It will allow to create less objects. Also this code can be moved in separate class "BaseConverter" and used here and in TranslateConverter

@Karnah
Copy link
Contributor

Karnah commented May 25, 2020

This is a wonderful change! There are many places in our project where we use LocProxy because LocExt doesn't support bindings!

@konne
Copy link
Member Author

konne commented May 25, 2020

@Karnah thanks for you improvement idea. Is already integrated. My plan is to add the docu changes and make a preRelease this week. I appreciate your feedback of usage in your project
It would be great if you can make a first test with this branch.

@Karnah
Copy link
Contributor

Karnah commented May 26, 2020

@konne, thanks, we'll try to update on next week

@konne konne merged commit 90ec9b7 into master May 27, 2020
@konne konne deleted the feature/mvvm4loc branch May 27, 2020 06:09
@konne konne restored the feature/mvvm4loc branch May 27, 2020 07:07
@konne
Copy link
Member Author

konne commented May 27, 2020

@Karnah @sa-he
preRelease nuget is online 3.7.0-alpha.45.nupkg

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

Successfully merging this pull request may close these issues.

4 participants