using System.Windows;
using System.Windows.Media;

namespace Txgy.EWS.Client.Common.Helpers
{
    public class TaggedVisual : DrawingVisual
    {
        public static readonly DependencyProperty TagProperty = DependencyProperty.RegisterAttached(
            "Tag",
            typeof(object),
            typeof(TaggedVisual),
            new PropertyMetadata(null));

        public static void SetTag(DependencyObject target, object value)
        {
            target.SetValue(TagProperty, value);
        }

        public static object GetTag(DependencyObject target)
        {
            return target.GetValue(TagProperty);
        }
    }
}
