public bool Equals(ElementPropertyKey key)
 {
     if (this.element == (key.element))
     {
         return(this.property == key.property);
     }
     return(false);
 }
        internal void NotifyElementPropertyChanged(RadElement element, RadPropertyChangedEventArgs args)
        {
            ElementPropertyKey key = new ElementPropertyKey(element, args.Property);

            ElementRadPropertyChangedDelegate handler = this.elementPropertyChangeEventList[key];

            if (handler != null)
            {
                handler(element, args);
            }

            List <IPropertyChangeListener> changeListeners = GetPropertyChangeListeners(args.Property);

            if (changeListeners == null)
            {
                return;
            }

            for (int i = 0; i < changeListeners.Count; i++)
            {
                changeListeners[i].OnRadPropertyChanged(element, args);
            }
        }
        internal void UnsubscribeFromElementPropertyChange(ElementRadPropertyChangedDelegate handler, RadElement radElement, RadProperty radProperty)
        {
            ElementPropertyKey key = new ElementPropertyKey(radElement, radProperty);

            this.elementPropertyChangeEventList.RemoveHandler(key, handler);
        }
        /// <summary>
        /// Subscribe for property-change event for given RadProperty of a specific RadElement
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="radElement"></param>
        /// <param name="radProperty"></param>
        internal void SubscribeForElementPropertyChange(ElementRadPropertyChangedDelegate handler, RadElement radElement, RadProperty radProperty)
        {
            ElementPropertyKey key = new ElementPropertyKey(radElement, radProperty);

            this.elementPropertyChangeEventList.AddHandler(key, handler);
        }