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/add subtract converters #16

Merged
merged 9 commits into from
Oct 9, 2019
Merged

Feature/add subtract converters #16

merged 9 commits into from
Oct 9, 2019

Conversation

sa-he
Copy link

@sa-he sa-he commented Jun 24, 2019

Please check if that meets your requirements - I tried to adapt to your approaches and base classes.

I can only compile full netframework stuff, not xamarin and uwp parts...

#15

@thomasgalliker
Copy link
Owner

Ah ok, I thought the 'IsInverted' was already part of StringIsNullOrEmptyConverter.... cool thanks. I just had a quick look: It looks good. I'll check it out and merge it asap.

@sa-he
Copy link
Author

sa-he commented Oct 8, 2019

Any progress on this one? I'd have ideas for more converters, but I'd need you to merge PR's and publish nuget packages. Otherwise I contribute but still have to maintain my local copy of the converter...

@thomasgalliker
Copy link
Owner

Ups... yes 💯 sorry for the delay. I'm recently a bit under fire (like everyone I guess). I'm coming back to this.

@thomasgalliker thomasgalliker changed the base branch from master to develop October 9, 2019 06:08
Copy link
Owner

@thomasgalliker thomasgalliker left a comment

Choose a reason for hiding this comment

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

I refactored some tests to use xUnit Theory

@thomasgalliker thomasgalliker merged commit ccbd160 into thomasgalliker:develop Oct 9, 2019
@thomasgalliker
Copy link
Owner

I'm not 100% sure if these two converters (AddConverter, SubtractConverter) are such a great value. Don't get me wrong. I think such logic does a better job in a view model. Don't you think so too?
On the otherhand side you can argue, that you don't want to bloat your view models, agree. But what if someone wants to add/subtract (or multiply) decimals, floats, etc. Of course, we could make the converters generic, but this would lead to more/unnecessarily complex code.

What is your use case for these converters?

@sa-he
Copy link
Author

sa-he commented Oct 11, 2019

I see your concerns. Thank you for merging the PR though. I use the converter in a MVVM app that draws little rectangles on a canvas. Canvas.Left/Top are bound to model.X/Y which define the center of a rectangle. As the size of the rectangle is a matter of the view, I decided to use a converter. It's an exotic use case - I admit.

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

Successfully merging this pull request may close these issues.

None yet

2 participants