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
MvxNativeValueConverter and MvxFormsValueConverter for MvvmCross.Forms #3047
Conversation
|
||
namespace Playground.Forms.UI.Converters | ||
{ | ||
public class StringToUpperValueConverter : MvxFormsValueConverter<string, string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great - can you actually make use of it in XAML please too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, doing it right now, just a few minutes :-)
I have added a sample page to the Playground app that uses both types of converters |
Seems like there is a build error, but I am not sure what it means :-O |
@MartinZikmund did you get a chance to rebase? I'm surprised that your changes caused the unit tests to fail |
@nickrandolph I did rebase to the latest develop, so I really don't know what could be the issue, I haven't touched anything related to the failing tests as far as I know. And judging by the full list of changes there does not seem to be anything bad as well. |
I re-ran the build, it is green 👍 |
@Cheesebaron Thanks :-) !!! |
✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Feature (see #2847)
This is a new PR instead of #3011 , which auto-closed when I had to revert a bad commit. Sorry about the confusion and complication.
Currently it is not easy to reuse existing
MvxValueConverters
in MvvmCross.Forms projects, as there is no helper class analogous to UWP'sMvxNativeValueConverter
that would act as an adapter between MvvmCross'IMvxValueConverter
and Xamarin.Forms'IValueConverter
.🆕 What is the new behavior (if this is a feature change)?
MvxNativeValueConverter
is an adapter that allows developers reuse existing MvvmCross value converters in their MvvmCross.Forms projects.MvxFormsValueConverter
is just a convenience class that specifies theIValueConverter
. This can act as the base class for MvvmCross.Forms-only value converters.💥 Does this PR introduce a breaking change?
No
🐛 Recommendations for testing
x
📝 Links to relevant issues/docs
x
🤔 Checklist before submitting