44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using ImageMagick;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace GUI.Controls;
|
|
|
|
/// <summary>
|
|
/// Interaction logic for ImageControl.xaml
|
|
/// </summary>
|
|
public partial class ImageControl : UserControl
|
|
{
|
|
/// <inheritdoc cref="Image"/>
|
|
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register(
|
|
nameof(Image), typeof(MagickImage), typeof(ImageControl), new PropertyMetadata(default(MagickImage)));
|
|
|
|
/// <summary>
|
|
/// The <see cref="MagickImage"/> displayed in this <see cref="ImageControl"/>
|
|
/// </summary>
|
|
public MagickImage Image
|
|
{
|
|
get => (MagickImage)GetValue(ImageProperty);
|
|
set => SetValue(ImageProperty, value);
|
|
}
|
|
|
|
/// <inheritdoc cref="ImageName"/>
|
|
public static readonly DependencyProperty ImageNameProperty = DependencyProperty.Register(
|
|
nameof(ImageName), typeof(object), typeof(ImageControl),
|
|
new PropertyMetadata(default(object)));
|
|
|
|
/// <summary>
|
|
/// The name of the loaded image
|
|
/// </summary>
|
|
public object ImageName
|
|
{
|
|
get => (object)GetValue(ImageNameProperty);
|
|
set => SetValue(ImageNameProperty, value);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public ImageControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
} |