XAML-Map-Control/MapControl/Shared/MapOverlay.cs

114 lines
3.2 KiB
C#
Raw Normal View History

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
2024-02-03 21:01:53 +01:00
// Copyright © 2024 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
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;
#endif
2012-10-25 08:42:51 +02:00
namespace MapControl
{
/// <summary>
/// Base class for map overlays with background, foreground, stroke and font properties.
2012-10-25 08:42:51 +02:00
/// </summary>
public partial class MapOverlay : MapPanel
2012-10-25 08:42:51 +02:00
{
public FontFamily FontFamily
{
2022-08-06 10:40:59 +02:00
get => (FontFamily)GetValue(FontFamilyProperty);
set => SetValue(FontFamilyProperty, value);
}
public double FontSize
{
2022-08-06 10:40:59 +02:00
get => (double)GetValue(FontSizeProperty);
set => SetValue(FontSizeProperty, value);
}
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
}
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
}
}
}