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

feat: Use DependencyPropertyGenerator #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

HavenDV
Copy link

@HavenDV HavenDV commented Jan 28, 2024

No description provided.

@HavenDV
Copy link
Author

HavenDV commented Jan 28, 2024

Not sure about the default DefaultBindingMode.TwoWay. This only makes sense for those properties that can be changed from library side

@HavenDV
Copy link
Author

HavenDV commented Jan 28, 2024

I checked the platform methods and didn't see anything changing these properties. So I removed all DefaultBindingMode.TwoWay

@HavenDV
Copy link
Author

HavenDV commented Jan 28, 2024

propertyChanged: (bindable, value, newValue) => ((CameraView)bindable).OnDetectionFinishedCommand = (ICommand)newValue

For the future - you don't need to write code like this, this duplication and assignment already happens in the property setter.

@FaithfulDev
Copy link

FaithfulDev commented Feb 6, 2024

@HavenDV Looking at this, I think I can see that you are trying to use this new dep to make the code more readable, but I'm not sure. Would you mind adding a description to this pull request, explaining your reason for making the changes? This may help the owner decide on it.

EDIT: You probably should also disclaim that you the owner of the added dep. Not that this is bad, but it should be considered, when deciding on adding new (maybe permanent) dependencies to the project.

@@ -25,6 +26,10 @@
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="DependencyPropertyGenerator" Version="1.5.0-beta.1">

Choose a reason for hiding this comment

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

I don't think this project should consume beta (pre-release) versions of nuget packages. Maybe wait, until it's released?

@HavenDV
Copy link
Author

HavenDV commented Feb 6, 2024

#25
The initial discussion regarding this was here

@afriscic
Copy link
Owner

afriscic commented Mar 8, 2024

Sorry, this is on hold for now as I currently don't have enough time to test it properly.

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.

3 participants