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

Added conversion option to PropertyObservable #10824

Merged

Conversation

TomEdwardsEnscape
Copy link
Contributor

What does the pull request do?

GetObservable and GetBindingObservable now have converter parameters, which can be used to execute user-defined conversion without appending a new observer onto the the original one. Aside from the performance loss, this task was made much harder for library consumers by the Avalonia.Reactive namespace being made internal.

This PR has been extracted from #10803 as requested by @grokys.

What is the current behavior?

To convert the value of a binding being defined in C#, users must define their own observable and construct it once per binding.

Obsoletions / Deprecations

None

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0032443-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@grokys grokys requested a review from maxkatz6 March 29, 2023 07:21
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

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

LGTM, and will be really useful.

Just wanted to get a 👍 from @maxkatz6 before merging.

@maxkatz6 maxkatz6 added this pull request to the merge queue Mar 31, 2023
Merged via the queue into AvaloniaUI:master with commit ef24eb8 Mar 31, 2023
@TomEdwardsEnscape TomEdwardsEnscape deleted the feature/propertyobservable-convert-func branch March 31, 2023 13:26
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.

4 participants