diff --git a/MapControl/Avalonia/ImageTile.Avalonia.cs b/MapControl/Avalonia/ImageTile.Avalonia.cs index 7e436993..7c5b5446 100644 --- a/MapControl/Avalonia/ImageTile.Avalonia.cs +++ b/MapControl/Avalonia/ImageTile.Avalonia.cs @@ -12,7 +12,7 @@ namespace MapControl public class ImageTile(int zoomLevel, int x, int y, int columnCount) : Tile(zoomLevel, x, y, columnCount) { - public Image Image { get; } = new Image { Stretch = Stretch.Fill }; + public Image Image { get; } = new() { Stretch = Stretch.Fill }; public override async Task LoadImageAsync(Func> loadImageFunc) { diff --git a/MapControl/Shared/GroundOverlay.cs b/MapControl/Shared/GroundOverlay.cs index bdc52d39..d938583e 100644 --- a/MapControl/Shared/GroundOverlay.cs +++ b/MapControl/Shared/GroundOverlay.cs @@ -39,7 +39,7 @@ namespace MapControl public string ImagePath { get; } - public Image Image { get; } = new Image { Stretch = Stretch.Fill }; + public Image Image { get; } = new() { Stretch = Stretch.Fill }; public async Task LoadImage(Uri docUri) { diff --git a/MapControl/Shared/MapBase.cs b/MapControl/Shared/MapBase.cs index 18925dbc..11c0ab28 100644 --- a/MapControl/Shared/MapBase.cs +++ b/MapControl/Shared/MapBase.cs @@ -174,7 +174,7 @@ namespace MapControl /// Gets the ViewTransform instance that is used to transform between projected /// map coordinates and view coordinates. /// - public ViewTransform ViewTransform { get; } = new ViewTransform(); + public ViewTransform ViewTransform { get; } = new(); /// /// Gets the map scale as horizontal and vertical scaling factors from meters to diff --git a/MapControl/Shared/MapScale.cs b/MapControl/Shared/MapScale.cs index 7e714660..c90f7a13 100644 --- a/MapControl/Shared/MapScale.cs +++ b/MapControl/Shared/MapScale.cs @@ -55,9 +55,9 @@ namespace MapControl set => SetValue(StrokeThicknessProperty, value); } - private readonly Polyline line = new Polyline(); + private readonly Polyline line = new (); - private readonly TextBlock label = new TextBlock + private readonly TextBlock label = new() { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center diff --git a/MapControl/WPF/ImageTile.WPF.cs b/MapControl/WPF/ImageTile.WPF.cs index 251d01ac..5f9004fa 100644 --- a/MapControl/WPF/ImageTile.WPF.cs +++ b/MapControl/WPF/ImageTile.WPF.cs @@ -11,7 +11,7 @@ namespace MapControl public class ImageTile(int zoomLevel, int x, int y, int columnCount) : Tile(zoomLevel, x, y, columnCount) { - public Image Image { get; } = new Image { Stretch = Stretch.Fill }; + public Image Image { get; } = new() { Stretch = Stretch.Fill }; public override async Task LoadImageAsync(Func> loadImageFunc) { diff --git a/MapControl/WinUI/ImageTile.WinUI.cs b/MapControl/WinUI/ImageTile.WinUI.cs index fa218e1b..69378da0 100644 --- a/MapControl/WinUI/ImageTile.WinUI.cs +++ b/MapControl/WinUI/ImageTile.WinUI.cs @@ -21,7 +21,7 @@ namespace MapControl public class ImageTile(int zoomLevel, int x, int y, int columnCount) : Tile(zoomLevel, x, y, columnCount) { - public Image Image { get; } = new Image { Stretch = Stretch.Fill }; + public Image Image { get; } = new() { Stretch = Stretch.Fill }; public override async Task LoadImageAsync(Func> loadImageFunc) {