protected override void OnAttached()
 {
     if (Binding != null)
     {
         OnBindingPropertyChanged();
     }
     if (string.IsNullOrEmpty(EventName))
     {
         return;
     }
     EventHelper.UnsubscribeFromEvent(EventAssociatedObject, ShortEventName);
     EventHelper.SubscribeToEvent(EventAssociatedObject, ShortEventName);
 }
Esempio n. 2
0
 protected virtual void OnSourceChanged(object oldSource, object newSource)
 {
     RaiseSourceChangedCount++;
     EventHelper.UnsubscribeFromEvent(oldSource, Event);
     EventHelper.UnsubscribeFromEvent(oldSource, EventName);
     EventHelper.SubscribeToEvent(newSource, EventName);
     EventHelper.SubscribeToEvent(newSource, Event);
 }
Esempio n. 3
0
        protected virtual void OnSourceChanged(object oldSource, object newSource)
        {
            RaiseSourceChangedCount++;
#if !SILVERLIGHT && !NETFX_CORE
            EventHelper.UnsubscribeFromEvent(oldSource, Event);
#endif
            EventHelper.UnsubscribeFromEvent(oldSource, EventName);
            EventHelper.SubscribeToEvent(newSource, EventName);
#if !SILVERLIGHT && !NETFX_CORE
            EventHelper.SubscribeToEvent(newSource, Event);
#endif
        }