mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
File scoped namespaces
This commit is contained in:
parent
c14377f976
commit
65aba44af6
152 changed files with 11962 additions and 12115 deletions
|
|
@ -6,50 +6,49 @@ using Microsoft.UI.Xaml;
|
|||
using Microsoft.UI.Xaml.Data;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
namespace MapControl;
|
||||
|
||||
public partial class MapContentControl
|
||||
{
|
||||
public partial class MapContentControl
|
||||
public MapContentControl()
|
||||
{
|
||||
public MapContentControl()
|
||||
DefaultStyleKey = typeof(MapContentControl);
|
||||
MapPanel.InitMapElement(this);
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
|
||||
var parentMap = MapPanel.GetParentMap(this);
|
||||
|
||||
if (parentMap != null)
|
||||
{
|
||||
DefaultStyleKey = typeof(MapContentControl);
|
||||
MapPanel.InitMapElement(this);
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
|
||||
var parentMap = MapPanel.GetParentMap(this);
|
||||
|
||||
if (parentMap != null)
|
||||
// Workaround for missing RelativeSource AncestorType=MapBase Bindings in default Style.
|
||||
//
|
||||
if (Background == null)
|
||||
{
|
||||
// Workaround for missing RelativeSource AncestorType=MapBase Bindings in default Style.
|
||||
//
|
||||
if (Background == null)
|
||||
{
|
||||
SetBinding(BackgroundProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Background)) });
|
||||
}
|
||||
if (Foreground == null)
|
||||
{
|
||||
SetBinding(ForegroundProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Foreground)) });
|
||||
}
|
||||
if (BorderBrush == null)
|
||||
{
|
||||
SetBinding(BorderBrushProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Foreground)) });
|
||||
}
|
||||
SetBinding(BackgroundProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Background)) });
|
||||
}
|
||||
if (Foreground == null)
|
||||
{
|
||||
SetBinding(ForegroundProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Foreground)) });
|
||||
}
|
||||
if (BorderBrush == null)
|
||||
{
|
||||
SetBinding(BorderBrushProperty,
|
||||
new Binding { Source = parentMap, Path = new PropertyPath(nameof(Foreground)) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Pushpin
|
||||
public partial class Pushpin
|
||||
{
|
||||
public Pushpin()
|
||||
{
|
||||
public Pushpin()
|
||||
{
|
||||
DefaultStyleKey = typeof(Pushpin);
|
||||
}
|
||||
DefaultStyleKey = typeof(Pushpin);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue