This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Fix a bug where the collections MapElements cannot be manipulated fro…#113
Merged
Fix a bug where the collections MapElements cannot be manipulated fro…#113
Conversation
…m the WinForms or WPF controls
Austin-Lamb
suggested changes
May 1, 2019
Austin-Lamb
left a comment
There was a problem hiding this comment.
Main thing I think should be done before merging this is getting the Layers property to work too, since that was reported as having the same bug.
Microsoft.Toolkit.Win32.UI.Controls/Interop/WinRT/WindowsRuntimeCollection.cs
Show resolved
Hide resolved
Apply PR feedback
michael-hawker
previously requested changes
May 1, 2019
Microsoft.Toolkit.Win32.UI.Controls/Interop/WinRT/WindowsRuntimeCollection.cs
Outdated
Show resolved
Hide resolved
Microsoft.Toolkit.Win32.UI.Controls/Interop/WinRT/WindowsRuntimeCollection.cs
Show resolved
Hide resolved
Austin-Lamb
reviewed
May 1, 2019
Austin-Lamb
approved these changes
May 1, 2019
JuanPapas
reviewed
May 1, 2019
JuanPapas
reviewed
May 1, 2019
| /// <summary> | ||
| /// Gets <see cref="windows.UI.Xaml.Controls.Maps.MapControl.MapElementsProperty"/> | ||
| /// </summary> | ||
| public static DependencyProperty MapElementsProperty { get; } = DependencyProperty.Register(nameof(MapElements), typeof(System.Collections.Generic.IList<MapElement>), typeof(MapControl)); |
There was a problem hiding this comment.
Regarding the removal of Dependency Properties, I assume that means data binding on those will be not possible. Am I missing something?
azchohfi
approved these changes
May 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change fixes an issue with WPF and WinForms MapElements property.
In WPF the property is initialized as null and in WinForms any change to the property is lost.
Issue: #
112[https://github.com//issues/112]
62[https://github.com//issues/62]
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When adding items to the Map.MapElements collection they will not appear on the map, code works in UWP but not in WinForms.
Expected behavior
I would expect the map element to be added...
What is the new behavior?
After calling Map.MapElements.Add(pushpin), the element is added and it is shown on the Map control.
PR Checklist
Please check if your PR fulfills the following requirements:
We are removing the metadata property MapElementsProperty in the WPF control as this is no longer required.
Other information