using System.Windows; using System.Windows.Controls; using System.Windows.Extensions; using System.Windows.Media; using System.Windows.Media.Effects; namespace WpfExtended.Tests.Controls { /// /// Interaction logic for CaptionedImage.xaml /// public partial class CaptionedImage : UserControl { public readonly static DependencyProperty ImageEffectProperty = DependencyPropertyExtensions.Register(nameof(ImageEffect)); public readonly static DependencyProperty ImageSourceProperty = DependencyPropertyExtensions.Register(nameof(ImageSource)); public readonly static DependencyProperty CaptionProperty = DependencyPropertyExtensions.Register(nameof(Caption)); public Effect ImageEffect { get => this.GetTypedValue(ImageEffectProperty); set => this.SetTypedValue(ImageEffectProperty, value); } public ImageSource ImageSource { get => this.GetTypedValue(ImageSourceProperty); set => this.SetTypedValue(ImageSourceProperty, value); } public string Caption { get => this.GetTypedValue(CaptionProperty); set => this.SetTypedValue(CaptionProperty, value); } public CaptionedImage() { InitializeComponent(); } } }