-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add XAML TypeConverters for Map coordinates (Location, MapSpan, Map.Region) #33995
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
3 changes: 3 additions & 0 deletions
3
src/Controls/Maps/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #nullable enable | ||
| static readonly Microsoft.Maui.Controls.Maps.Map.RegionProperty -> Microsoft.Maui.Controls.BindableProperty! | ||
| Microsoft.Maui.Controls.Maps.Map.Region.get -> Microsoft.Maui.Maps.MapSpan? | ||
| Microsoft.Maui.Controls.Maps.Map.Region.set -> void |
89 changes: 89 additions & 0 deletions
89
src/Controls/tests/Core.UnitTests/MapSpanTypeConverterTests.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| using System; | ||
| using System.Globalization; | ||
| using Microsoft.Maui.Devices.Sensors; | ||
| using Microsoft.Maui.Maps; | ||
| using Xunit; | ||
|
|
||
| namespace Microsoft.Maui.Controls.Core.UnitTests | ||
| { | ||
| public class MapSpanTypeConverterTests : BaseTestFixture | ||
| { | ||
| [Fact] | ||
| public void ConvertFromValidString() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| var result = (MapSpan)converter.ConvertFrom(null, CultureInfo.InvariantCulture, "36.9628,-122.0195,0.01,0.02")!; | ||
|
|
||
| Assert.Equal(36.9628, result.Center.Latitude, 4); | ||
| Assert.Equal(-122.0195, result.Center.Longitude, 4); | ||
| Assert.Equal(0.01, result.LatitudeDegrees, 10); | ||
| Assert.Equal(0.02, result.LongitudeDegrees, 10); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConvertFromWithSpaces() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| var result = (MapSpan)converter.ConvertFrom(null, CultureInfo.InvariantCulture, " 36.9628 , -122.0195 , 0.01 , 0.02 ")!; | ||
|
|
||
| Assert.Equal(36.9628, result.Center.Latitude, 4); | ||
| Assert.Equal(-122.0195, result.Center.Longitude, 4); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConvertToString() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| var span = new MapSpan(new Location(36.9628, -122.0195), 0.01, 0.02); | ||
| var result = converter.ConvertTo(null, CultureInfo.InvariantCulture, span, typeof(string)); | ||
|
|
||
| Assert.Equal("36.9628,-122.0195,0.01,0.02", result); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConvertFromInvalidStringThrows() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| Assert.Throws<InvalidOperationException>(() => | ||
| converter.ConvertFrom(null, CultureInfo.InvariantCulture, "invalid")); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConvertFromTooFewPartsThrows() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| Assert.Throws<InvalidOperationException>(() => | ||
| converter.ConvertFrom(null, CultureInfo.InvariantCulture, "36.9628,-122.0195")); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConvertFromEmptyStringThrows() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| Assert.Throws<InvalidOperationException>(() => | ||
| converter.ConvertFrom(null, CultureInfo.InvariantCulture, "")); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void CanConvertFromString() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| Assert.True(converter.CanConvertFrom(null, typeof(string))); | ||
| Assert.False(converter.CanConvertFrom(null, typeof(int))); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void RoundTrip() | ||
| { | ||
| var converter = new MapSpanTypeConverter(); | ||
| var original = new MapSpan(new Location(47.6062, -122.3321), 0.5, 0.5); | ||
| var str = (string)converter.ConvertTo(null, CultureInfo.InvariantCulture, original, typeof(string))!; | ||
| var result = (MapSpan)converter.ConvertFrom(null, CultureInfo.InvariantCulture, str)!; | ||
|
|
||
| Assert.Equal(original.Center.Latitude, result.Center.Latitude, 10); | ||
| Assert.Equal(original.Center.Longitude, result.Center.Longitude, 10); | ||
| Assert.Equal(original.LatitudeDegrees, result.LatitudeDegrees, 10); | ||
| Assert.Equal(original.LongitudeDegrees, result.LongitudeDegrees, 10); | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| using System; | ||
| using System.ComponentModel; | ||
| using System.Globalization; | ||
| using Microsoft.Maui.Devices.Sensors; | ||
|
|
||
| namespace Microsoft.Maui.Maps | ||
| { | ||
| /// <summary> | ||
| /// A type converter that converts a string representation to a <see cref="MapSpan"/> object. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Supported formats: | ||
| /// <list type="bullet"> | ||
| /// <item><description><c>"latitude,longitude,latitudeDegrees,longitudeDegrees"</c> (e.g., <c>"36.9628,-122.0195,0.01,0.01"</c>)</description></item> | ||
| /// </list> | ||
| /// </remarks> | ||
| public class MapSpanTypeConverter : TypeConverter | ||
| { | ||
| /// <inheritdoc/> | ||
| public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) | ||
| => sourceType == typeof(string); | ||
|
|
||
| /// <inheritdoc/> | ||
| public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) | ||
| => destinationType == typeof(string); | ||
|
|
||
| /// <inheritdoc/> | ||
| public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) | ||
| { | ||
| var strValue = value?.ToString()?.Trim(); | ||
|
|
||
| if (string.IsNullOrEmpty(strValue)) | ||
| throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(MapSpan)}"); | ||
|
|
||
| var parts = strValue.Split(','); | ||
|
|
||
| if (parts.Length == 4 | ||
| && double.TryParse(parts[0].Trim(), NumberStyles.Float | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out double latitude) | ||
| && double.TryParse(parts[1].Trim(), NumberStyles.Float | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out double longitude) | ||
| && double.TryParse(parts[2].Trim(), NumberStyles.Float | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out double latDegrees) | ||
| && double.TryParse(parts[3].Trim(), NumberStyles.Float | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out double lonDegrees)) | ||
| { | ||
| return new MapSpan(new Location(latitude, longitude), latDegrees, lonDegrees); | ||
| } | ||
|
|
||
| throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(MapSpan)}"); | ||
| } | ||
|
|
||
| /// <inheritdoc/> | ||
| public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) | ||
| { | ||
| if (value is not MapSpan span) | ||
| throw new NotSupportedException(); | ||
|
|
||
| return $"{span.Center.Latitude.ToString(CultureInfo.InvariantCulture)},{span.Center.Longitude.ToString(CultureInfo.InvariantCulture)}," + | ||
| $"{span.LatitudeDegrees.ToString(CultureInfo.InvariantCulture)},{span.LongitudeDegrees.ToString(CultureInfo.InvariantCulture)}"; | ||
| } | ||
| } | ||
| } |
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
6 changes: 6 additions & 0 deletions
6
src/Core/maps/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Core/maps/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Core/maps/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Core/maps/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Core/maps/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter | ||
| Microsoft.Maui.Maps.MapSpanTypeConverter.MapSpanTypeConverter() -> void | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object? | ||
| override Microsoft.Maui.Maps.MapSpanTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type! destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Essentials/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter.LocationTypeConverter() -> void | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType) -> bool | ||
| override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) -> object? | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType) -> object? |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter.LocationTypeConverter() -> void | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType) -> bool | ||
| override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) -> object? | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Essentials/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter.LocationTypeConverter() -> void | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType) -> bool | ||
| override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) -> object? | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Essentials/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter.LocationTypeConverter() -> void | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType) -> bool | ||
| override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) -> object? | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType) -> object? |
6 changes: 6 additions & 0 deletions
6
src/Essentials/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| #nullable enable | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter | ||
| Microsoft.Maui.Devices.Sensors.LocationTypeConverter.LocationTypeConverter() -> void | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType) -> bool | ||
| override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) -> object? | ||
| ~override Microsoft.Maui.Devices.Sensors.LocationTypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType) -> object? |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Regionis described as “the region displayed by the map”, but it is only used as an input to callMoveToRegion()when set. It is not kept in sync with user panning/zooming (that state is exposed viaVisibleRegion). This makes the public API contract misleading—please clarify the XML docs (or consider syncingRegionfromVisibleRegionwithout re-invokingMoveToRegionto avoid feedback loops).