mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Simplified new expressions
This commit is contained in:
parent
ae0ebc6fdb
commit
2ec8b1b987
|
|
@ -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<Task<IImage>> loadImageFunc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ namespace MapControl
|
|||
/// Gets the ViewTransform instance that is used to transform between projected
|
||||
/// map coordinates and view coordinates.
|
||||
/// </summary>
|
||||
public ViewTransform ViewTransform { get; } = new ViewTransform();
|
||||
public ViewTransform ViewTransform { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the map scale as horizontal and vertical scaling factors from meters to
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<Task<ImageSource>> loadImageFunc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<Task<ImageSource>> loadImageFunc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue