This repository has been archived on 2024-06-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thesis-src/Examples/GUI/Controls/ImageControl.xaml.cs
2023-11-22 06:51:08 +01:00

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();
}
}