Skip to content

Instantly share code, notes, and snippets.

@jasondown
Created August 3, 2021 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasondown/b8139296b2c0012c154859c09c6b7b15 to your computer and use it in GitHub Desktop.
Save jasondown/b8139296b2c0012c154859c09c6b7b15 to your computer and use it in GitHub Desktop.
using System;
using System.Windows.Controls;
namespace Jason.Down.Blog.MutliImageAddinDemo.ViewModel
{
/// <summary>
/// This class represents an item image.
/// </summary>
[Serializable]
public class ImageViewModel : ViewModelBase
{
private Image _itemImage;
/// <summary>
/// Initializes a new instance of the <see cref="ImageViewModel"/> class.
/// </summary>
/// <param name="itemImage">The item image.</param>
public ImageViewModel(Image itemImage)
{
ItemImage = itemImage;
}
/// <summary>
/// Gets or sets the item image.
/// </summary>
/// <value>
/// The item image.
/// </value>
public Image ItemImage
{
get { return _itemImage; }
set
{
if (!Equals(_itemImage, value))
{
_itemImage = value;
OnPropertyChanged();
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment