mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.0.1: Fixed MapOverlay.
This commit is contained in:
parent
9f3b41cb0b
commit
3774bf2ed3
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("4.0.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("4.0.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("4.0.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Image.BeginAnimation(UIElement.OpacityProperty,
|
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { To = 1d, Duration = FadeDuration });
|
||||||
new DoubleAnimation { From = 0d, To = 1d, Duration = FadeDuration });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -47,8 +46,7 @@ namespace MapControl
|
||||||
bitmapImage.ImageOpened -= BitmapImageOpened;
|
bitmapImage.ImageOpened -= BitmapImageOpened;
|
||||||
bitmapImage.ImageFailed -= BitmapImageFailed;
|
bitmapImage.ImageFailed -= BitmapImageFailed;
|
||||||
|
|
||||||
Image.BeginAnimation(UIElement.OpacityProperty,
|
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { To = 1d, Duration = FadeDuration });
|
||||||
new DoubleAnimation { From = 0d, To = 1d, Duration = FadeDuration });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BitmapImageFailed(object sender, ExceptionRoutedEventArgs e)
|
private void BitmapImageFailed(object sender, ExceptionRoutedEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,16 @@ namespace MapControl
|
||||||
var lonLabelStart = Math.Ceiling(bounds.West / lineDistance) * lineDistance;
|
var lonLabelStart = Math.Ceiling(bounds.West / lineDistance) * lineDistance;
|
||||||
var latLabels = new List<Label>((int)((bounds.North - latLabelStart) / lineDistance) + 1);
|
var latLabels = new List<Label>((int)((bounds.North - latLabelStart) / lineDistance) + 1);
|
||||||
var lonLabels = new List<Label>((int)((bounds.East - lonLabelStart) / lineDistance) + 1);
|
var lonLabels = new List<Label>((int)((bounds.East - lonLabelStart) / lineDistance) + 1);
|
||||||
|
var typeface = CreateTypeface();
|
||||||
|
var pen = CreatePen();
|
||||||
|
|
||||||
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance)
|
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance)
|
||||||
{
|
{
|
||||||
latLabels.Add(new Label(lat, new FormattedText(
|
latLabels.Add(new Label(lat, new FormattedText(
|
||||||
GetLabelText(lat, labelFormat, "NS"),
|
GetLabelText(lat, labelFormat, "NS"),
|
||||||
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, Typeface, FontSize, Foreground)));
|
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, typeface, FontSize, Foreground)));
|
||||||
|
|
||||||
drawingContext.DrawLine(Pen,
|
drawingContext.DrawLine(pen,
|
||||||
projection.LocationToViewportPoint(new Location(lat, bounds.West)),
|
projection.LocationToViewportPoint(new Location(lat, bounds.West)),
|
||||||
projection.LocationToViewportPoint(new Location(lat, bounds.East)));
|
projection.LocationToViewportPoint(new Location(lat, bounds.East)));
|
||||||
}
|
}
|
||||||
|
|
@ -64,9 +66,9 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
lonLabels.Add(new Label(lon, new FormattedText(
|
lonLabels.Add(new Label(lon, new FormattedText(
|
||||||
GetLabelText(Location.NormalizeLongitude(lon), labelFormat, "EW"),
|
GetLabelText(Location.NormalizeLongitude(lon), labelFormat, "EW"),
|
||||||
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, Typeface, FontSize, Foreground)));
|
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, typeface, FontSize, Foreground)));
|
||||||
|
|
||||||
drawingContext.DrawLine(Pen,
|
drawingContext.DrawLine(pen,
|
||||||
projection.LocationToViewportPoint(new Location(bounds.South, lon)),
|
projection.LocationToViewportPoint(new Location(bounds.South, lon)),
|
||||||
projection.LocationToViewportPoint(new Location(bounds.North, lon)));
|
projection.LocationToViewportPoint(new Location(bounds.North, lon)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,90 +11,63 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class MapOverlay
|
public partial class MapOverlay
|
||||||
{
|
{
|
||||||
public static readonly DependencyProperty FontSizeProperty = Control.FontSizeProperty.AddOwner(
|
public static readonly DependencyProperty FontSizeProperty = Control.FontSizeProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty FontFamilyProperty = Control.FontFamilyProperty.AddOwner(
|
public static readonly DependencyProperty FontFamilyProperty = Control.FontFamilyProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).typeface = null));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty FontStyleProperty = Control.FontStyleProperty.AddOwner(
|
public static readonly DependencyProperty FontStyleProperty = Control.FontStyleProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).typeface = null));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty FontStretchProperty = Control.FontStretchProperty.AddOwner(
|
public static readonly DependencyProperty FontStretchProperty = Control.FontStretchProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).typeface = null));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty FontWeightProperty = Control.FontWeightProperty.AddOwner(
|
public static readonly DependencyProperty FontWeightProperty = Control.FontWeightProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).typeface = null));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty ForegroundProperty = Control.ForegroundProperty.AddOwner(
|
public static readonly DependencyProperty ForegroundProperty = Control.ForegroundProperty.AddOwner(typeof(MapOverlay));
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => { if (o.GetValue(StrokeProperty) == null) ((MapOverlay)o).pen = null; }));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeProperty = Shape.StrokeProperty.AddOwner(
|
public static readonly DependencyProperty StrokeProperty = Shape.StrokeProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeThicknessProperty = Shape.StrokeThicknessProperty.AddOwner(
|
public static readonly DependencyProperty StrokeThicknessProperty = Shape.StrokeThicknessProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeDashArrayProperty = Shape.StrokeDashArrayProperty.AddOwner(
|
public static readonly DependencyProperty StrokeDashArrayProperty = Shape.StrokeDashArrayProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeDashOffsetProperty = Shape.StrokeDashOffsetProperty.AddOwner(
|
public static readonly DependencyProperty StrokeDashOffsetProperty = Shape.StrokeDashOffsetProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeDashCapProperty = Shape.StrokeDashCapProperty.AddOwner(
|
public static readonly DependencyProperty StrokeDashCapProperty = Shape.StrokeDashCapProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeStartLineCapProperty = Shape.StrokeStartLineCapProperty.AddOwner(
|
public static readonly DependencyProperty StrokeStartLineCapProperty = Shape.StrokeStartLineCapProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeEndLineCapProperty = Shape.StrokeEndLineCapProperty.AddOwner(
|
public static readonly DependencyProperty StrokeEndLineCapProperty = Shape.StrokeEndLineCapProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeLineJoinProperty = Shape.StrokeLineJoinProperty.AddOwner(
|
public static readonly DependencyProperty StrokeLineJoinProperty = Shape.StrokeLineJoinProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
|
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata((o, e) => ((MapOverlay)o).pen = null));
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
private Typeface typeface;
|
protected Typeface CreateTypeface()
|
||||||
private Pen pen;
|
|
||||||
|
|
||||||
protected Typeface Typeface
|
|
||||||
{
|
{
|
||||||
get
|
return new Typeface(FontFamily, FontStyle, FontWeight, FontStretch);
|
||||||
{
|
|
||||||
if (typeface == null)
|
|
||||||
{
|
|
||||||
typeface = new Typeface(FontFamily, FontStyle, FontWeight, FontStretch);
|
|
||||||
}
|
|
||||||
|
|
||||||
return typeface;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Pen Pen
|
protected Pen CreatePen()
|
||||||
{
|
{
|
||||||
get
|
return new Pen
|
||||||
{
|
{
|
||||||
if (pen == null)
|
Brush = Stroke ?? Foreground,
|
||||||
{
|
Thickness = StrokeThickness,
|
||||||
pen = new Pen
|
DashStyle = new DashStyle(StrokeDashArray, StrokeDashOffset),
|
||||||
{
|
DashCap = StrokeDashCap,
|
||||||
Brush = Stroke ?? Foreground,
|
StartLineCap = StrokeStartLineCap,
|
||||||
Thickness = StrokeThickness,
|
EndLineCap = StrokeEndLineCap,
|
||||||
DashStyle = new DashStyle(StrokeDashArray, StrokeDashOffset),
|
LineJoin = StrokeLineJoin,
|
||||||
DashCap = StrokeDashCap,
|
MiterLimit = StrokeMiterLimit
|
||||||
StartLineCap = StrokeStartLineCap,
|
};
|
||||||
EndLineCap = StrokeEndLineCap,
|
|
||||||
LineJoin = StrokeLineJoin,
|
|
||||||
MiterLimit = StrokeMiterLimit
|
|
||||||
};
|
|
||||||
|
|
||||||
pen.Freeze();
|
|
||||||
}
|
|
||||||
|
|
||||||
return pen;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ namespace MapControl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MapScale : MapOverlay
|
public class MapScale : MapOverlay
|
||||||
{
|
{
|
||||||
public static readonly DependencyProperty PaddingProperty = Control.PaddingProperty.AddOwner(
|
public static readonly DependencyProperty PaddingProperty = Control.PaddingProperty.AddOwner(typeof(MapScale));
|
||||||
typeof(MapScale), new FrameworkPropertyMetadata(new Thickness(2d)));
|
|
||||||
|
|
||||||
private double length;
|
private double length;
|
||||||
private Size size;
|
private Size size;
|
||||||
|
|
@ -78,12 +77,13 @@ namespace MapControl
|
||||||
var y2 = size.Height - Padding.Bottom - StrokeThickness / 2d;
|
var y2 = size.Height - Padding.Bottom - StrokeThickness / 2d;
|
||||||
var text = new FormattedText(
|
var text = new FormattedText(
|
||||||
length >= 1000d ? string.Format("{0:0} km", length / 1000d) : string.Format("{0:0} m", length),
|
length >= 1000d ? string.Format("{0:0} km", length / 1000d) : string.Format("{0:0} m", length),
|
||||||
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, Typeface, FontSize, Foreground);
|
CultureInfo.InvariantCulture, FlowDirection.LeftToRight, CreateTypeface(), FontSize, Foreground);
|
||||||
|
var pen = CreatePen();
|
||||||
|
|
||||||
drawingContext.DrawRectangle(Background ?? ParentMap.Background, null, new Rect(size));
|
drawingContext.DrawRectangle(Background ?? ParentMap.Background, null, new Rect(size));
|
||||||
drawingContext.DrawLine(Pen, new Point(x1, y1), new Point(x1, y2));
|
drawingContext.DrawLine(pen, new Point(x1, y1), new Point(x1, y2));
|
||||||
drawingContext.DrawLine(Pen, new Point(x2, y1), new Point(x2, y2));
|
drawingContext.DrawLine(pen, new Point(x2, y1), new Point(x2, y2));
|
||||||
drawingContext.DrawLine(Pen, new Point(x1, y2), new Point(x2, y2));
|
drawingContext.DrawLine(pen, new Point(x1, y2), new Point(x2, y2));
|
||||||
drawingContext.DrawText(text, new Point((size.Width - text.Width) / 2d, 0d));
|
drawingContext.DrawText(text, new Point((size.Width - text.Width) / 2d, 0d));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Windows;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("4.0.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Image.BeginAnimation(UIElement.OpacityProperty,
|
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(1d, FadeDuration));
|
||||||
new DoubleAnimation(0d, 1d, FadeDuration));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -47,8 +46,7 @@ namespace MapControl
|
||||||
bitmapSource.DownloadCompleted -= BitmapDownloadCompleted;
|
bitmapSource.DownloadCompleted -= BitmapDownloadCompleted;
|
||||||
bitmapSource.DownloadFailed -= BitmapDownloadFailed;
|
bitmapSource.DownloadFailed -= BitmapDownloadFailed;
|
||||||
|
|
||||||
Image.BeginAnimation(UIElement.OpacityProperty,
|
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(1d, FadeDuration));
|
||||||
new DoubleAnimation(0d, 1d, FadeDuration));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BitmapDownloadFailed(object sender, ExceptionEventArgs e)
|
private void BitmapDownloadFailed(object sender, ExceptionEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("3.3.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("3.3.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -10,28 +10,28 @@ namespace WpfApplication
|
||||||
private Geometry outline;
|
private Geometry outline;
|
||||||
|
|
||||||
public static readonly DependencyProperty TextProperty = TextBlock.TextProperty.AddOwner(
|
public static readonly DependencyProperty TextProperty = TextBlock.TextProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty FontSizeProperty = TextBlock.FontSizeProperty.AddOwner(
|
public static readonly DependencyProperty FontSizeProperty = TextBlock.FontSizeProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty FontFamilyProperty = TextBlock.FontFamilyProperty.AddOwner(
|
public static readonly DependencyProperty FontFamilyProperty = TextBlock.FontFamilyProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty FontStyleProperty = TextBlock.FontStyleProperty.AddOwner(
|
public static readonly DependencyProperty FontStyleProperty = TextBlock.FontStyleProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty FontWeightProperty = TextBlock.FontWeightProperty.AddOwner(
|
public static readonly DependencyProperty FontWeightProperty = TextBlock.FontWeightProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty FontStretchProperty = TextBlock.FontStretchProperty.AddOwner(
|
public static readonly DependencyProperty FontStretchProperty = TextBlock.FontStretchProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty ForegroundProperty = TextBlock.ForegroundProperty.AddOwner(
|
public static readonly DependencyProperty ForegroundProperty = TextBlock.ForegroundProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty BackgroundProperty = TextBlock.BackgroundProperty.AddOwner(
|
public static readonly DependencyProperty BackgroundProperty = TextBlock.BackgroundProperty.AddOwner(
|
||||||
typeof(OutlinedText), new FrameworkPropertyMetadata(Brushes.White, (o, e) => ((OutlinedText)o).glyphRun = null));
|
typeof(OutlinedText), new FrameworkPropertyMetadata(Brushes.White, (o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true });
|
||||||
|
|
||||||
public static readonly DependencyProperty OutlineThicknessProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty OutlineThicknessProperty = DependencyProperty.Register(
|
||||||
"OutlineThickness", typeof(double), typeof(OutlinedText),
|
"OutlineThickness", typeof(double), typeof(OutlinedText),
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
[assembly: AssemblyCopyright("© 2017 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("4.0.0")]
|
[assembly: AssemblyVersion("4.0.1")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0")]
|
[assembly: AssemblyFileVersion("4.0.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue