mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Code style
This commit is contained in:
parent
e3b221a80b
commit
bcd12ba5b8
|
|
@ -123,11 +123,7 @@ namespace MapControl
|
||||||
if (LocationMemberPath != null && container is MapItem mapItem)
|
if (LocationMemberPath != null && container is MapItem mapItem)
|
||||||
{
|
{
|
||||||
mapItem.SetBinding(MapItem.LocationProperty,
|
mapItem.SetBinding(MapItem.LocationProperty,
|
||||||
new Binding
|
new Binding { Source = item, Path = new PropertyPath(LocationMemberPath) });
|
||||||
{
|
|
||||||
Path = new PropertyPath(LocationMemberPath),
|
|
||||||
Source = item
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,12 +68,12 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
base.SetParentMap(map);
|
base.SetParentMap(map);
|
||||||
|
|
||||||
line.SetBinding(Shape.StrokeProperty,
|
|
||||||
new Binding { Source = map, Path = new PropertyPath(nameof(MapBase.Foreground)) });
|
|
||||||
|
|
||||||
line.SetBinding(Shape.StrokeThicknessProperty,
|
line.SetBinding(Shape.StrokeThicknessProperty,
|
||||||
new Binding { Source = this, Path = new PropertyPath(nameof(StrokeThickness)) });
|
new Binding { Source = this, Path = new PropertyPath(nameof(StrokeThickness)) });
|
||||||
|
|
||||||
|
line.SetBinding(Shape.StrokeProperty,
|
||||||
|
new Binding { Source = map, Path = new PropertyPath(nameof(MapBase.Foreground)) });
|
||||||
|
|
||||||
#if UWP || WINUI
|
#if UWP || WINUI
|
||||||
label.SetBinding(TextBlock.ForegroundProperty,
|
label.SetBinding(TextBlock.ForegroundProperty,
|
||||||
new Binding { Source = map, Path = new PropertyPath(nameof(MapBase.Foreground)) });
|
new Binding { Source = map, Path = new PropertyPath(nameof(MapBase.Foreground)) });
|
||||||
|
|
|
||||||
|
|
@ -39,29 +39,17 @@ namespace MapControl
|
||||||
Stretch = Stretch.None
|
Stretch = Stretch.None
|
||||||
};
|
};
|
||||||
|
|
||||||
path.SetBinding(Shape.FillProperty, new Binding
|
path.SetBinding(Shape.FillProperty,
|
||||||
{
|
new Binding { Source = this, Path = new PropertyPath(nameof(Background)) });
|
||||||
Path = new PropertyPath(nameof(Background)),
|
|
||||||
Source = this
|
|
||||||
});
|
|
||||||
|
|
||||||
path.SetBinding(Shape.StrokeProperty, new Binding
|
path.SetBinding(Shape.StrokeProperty,
|
||||||
{
|
new Binding { Source = this, Path = new PropertyPath(nameof(BorderBrush)) });
|
||||||
Path = new PropertyPath(nameof(BorderBrush)),
|
|
||||||
Source = this
|
|
||||||
});
|
|
||||||
|
|
||||||
path.SetBinding(Shape.StrokeThicknessProperty, new Binding
|
path.SetBinding(Shape.StrokeThicknessProperty,
|
||||||
{
|
new Binding { Source = this, Path = new PropertyPath(nameof(BorderWidth)) });
|
||||||
Path = new PropertyPath(nameof(BorderWidth)),
|
|
||||||
Source = this
|
|
||||||
});
|
|
||||||
|
|
||||||
border.SetBinding(PaddingProperty, new Binding
|
border.SetBinding(PaddingProperty,
|
||||||
{
|
new Binding { Source = this, Path = new PropertyPath(nameof(Padding)) });
|
||||||
Path = new PropertyPath(nameof(Padding)),
|
|
||||||
Source = this
|
|
||||||
});
|
|
||||||
|
|
||||||
SetBorderMargin();
|
SetBorderMargin();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue