2017-06-25 23:05:48 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2023-01-03 15:12:53 +01:00
|
|
|
|
// Copyright © 2023 Clemens Fischer
|
2012-10-25 08:42:51 +02:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2021-06-14 21:41:37 +02:00
|
|
|
|
#if WINUI
|
|
|
|
|
|
using Microsoft.UI.Xaml.Media;
|
|
|
|
|
|
using Windows.UI.Text;
|
2021-11-17 23:17:11 +01:00
|
|
|
|
#elif UWP
|
2014-07-01 18:57:44 +02:00
|
|
|
|
using Windows.UI.Text;
|
|
|
|
|
|
using Windows.UI.Xaml.Media;
|
|
|
|
|
|
#else
|
2012-10-25 08:42:51 +02:00
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Media;
|
2014-07-01 18:57:44 +02:00
|
|
|
|
#endif
|
2012-10-25 08:42:51 +02:00
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2017-06-25 23:05:48 +02:00
|
|
|
|
/// Base class for map overlays with background, foreground, stroke and font properties.
|
2012-10-25 08:42:51 +02:00
|
|
|
|
/// </summary>
|
2014-07-01 18:57:44 +02:00
|
|
|
|
public partial class MapOverlay : MapPanel
|
2012-10-25 08:42:51 +02:00
|
|
|
|
{
|
2013-04-12 19:59:16 +02:00
|
|
|
|
public FontFamily FontFamily
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (FontFamily)GetValue(FontFamilyProperty);
|
|
|
|
|
|
set => SetValue(FontFamilyProperty, value);
|
2013-04-12 19:59:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2018-05-01 12:45:19 +02:00
|
|
|
|
public double FontSize
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (double)GetValue(FontSizeProperty);
|
|
|
|
|
|
set => SetValue(FontSizeProperty, value);
|
2018-05-01 12:45:19 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2012-11-22 21:42:29 +01:00
|
|
|
|
public FontStyle FontStyle
|
2012-10-25 08:42:51 +02:00
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (FontStyle)GetValue(FontStyleProperty);
|
|
|
|
|
|
set => SetValue(FontStyleProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public FontStretch FontStretch
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (FontStretch)GetValue(FontStretchProperty);
|
|
|
|
|
|
set => SetValue(FontStretchProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2012-11-22 21:42:29 +01:00
|
|
|
|
public FontWeight FontWeight
|
2012-10-25 08:42:51 +02:00
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (FontWeight)GetValue(FontWeightProperty);
|
|
|
|
|
|
set => SetValue(FontWeightProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Brush Foreground
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (Brush)GetValue(ForegroundProperty);
|
|
|
|
|
|
set => SetValue(ForegroundProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Brush Stroke
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (Brush)GetValue(StrokeProperty);
|
|
|
|
|
|
set => SetValue(StrokeProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public double StrokeThickness
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (double)GetValue(StrokeThicknessProperty);
|
|
|
|
|
|
set => SetValue(StrokeThicknessProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DoubleCollection StrokeDashArray
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (DoubleCollection)GetValue(StrokeDashArrayProperty);
|
|
|
|
|
|
set => SetValue(StrokeDashArrayProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public double StrokeDashOffset
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (double)GetValue(StrokeDashOffsetProperty);
|
|
|
|
|
|
set => SetValue(StrokeDashOffsetProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PenLineCap StrokeDashCap
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (PenLineCap)GetValue(StrokeDashCapProperty);
|
|
|
|
|
|
set => SetValue(StrokeDashCapProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PenLineCap StrokeStartLineCap
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (PenLineCap)GetValue(StrokeStartLineCapProperty);
|
|
|
|
|
|
set => SetValue(StrokeStartLineCapProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PenLineCap StrokeEndLineCap
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (PenLineCap)GetValue(StrokeEndLineCapProperty);
|
|
|
|
|
|
set => SetValue(StrokeEndLineCapProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PenLineJoin StrokeLineJoin
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (PenLineJoin)GetValue(StrokeLineJoinProperty);
|
|
|
|
|
|
set => SetValue(StrokeLineJoinProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public double StrokeMiterLimit
|
|
|
|
|
|
{
|
2022-08-06 10:40:59 +02:00
|
|
|
|
get => (double)GetValue(StrokeMiterLimitProperty);
|
|
|
|
|
|
set => SetValue(StrokeMiterLimitProperty, value);
|
2012-10-25 08:42:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|