Renamed GeoImage

This commit is contained in:
Clemens 2022-01-16 18:39:50 +01:00
parent abde6ad9fd
commit 41cd7c569d
7 changed files with 307 additions and 22 deletions

View file

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace MapControl
{
public partial class GeoImage : FrameworkElement
{
public BitmapSource Source
{
get { return (BitmapSource)GetValue(SourceProperty); }
set { SetValue(SourceProperty, value); }
}
public static readonly DependencyProperty SourceProperty =
DependencyProperty.Register(nameof(Source), typeof(BitmapSource), typeof(GeoImage),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
protected override void OnRender(DrawingContext drawingContext)
{
if (Source != null)
{
drawingContext.DrawImage(Source, new Rect(RenderSize));
}
}
}
}