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

Made Avalonia MapControl's Map property DirectProperty #2481

Merged
merged 1 commit into from Feb 3, 2024

Conversation

mr-const
Copy link
Contributor

Made Avalonia MapControl's Map property direct, because it doesn't need styling and thus we can remove necessity to access it in UI thread only.

Using StyledProperty, as it was made in previous PR requires access to Map property through UI thread and it was not really good idea.
DirectProperty, on the other hand, allows us to use existing Map property without any modifications.
(More details can be found here)

Removed databinding from sample, because it needs a little bit more advanced DI to use (currently we assign DataContext after construction, but constructor needs ViewModel's Map property to initialize)

…ed styling and thus we can remove necessity to access it in UI thread only.

Removed databinding from sample, because it needs a little bit more advanced DI to use (currently we assign DataContext after construction, but constructor needs ViewModel's Map property to initialize)
@CLAassistant
Copy link

CLAassistant commented Jan 31, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@pauldendulk pauldendulk left a comment

Choose a reason for hiding this comment

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

Again I can not properly review this and will accept it as is. The link to the documentation is helpful. We value a minimal approach in Mapsui so if a simpler solution suffices this is better. I like the fact that this direct property is now in the Avalonia MapControl and needs no #if.

One question: You do not use data binding in the sample because it would need more changes to the sample, fine. But it is possible to use data binding with the DirectProperty?

@pauldendulk pauldendulk merged commit 1896d99 into Mapsui:main Feb 3, 2024
5 checks passed
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

3 participants