// Helper method to retrieve and fire Clr Event handlers for DependencyPropertyChanged event private void RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args) { EventHandlersStore store = EventHandlersStore; if (store != null) { Delegate handler = store.Get(key); if (handler != null) { ((DependencyPropertyChangedEventHandler)handler)(this, args); } } }
private void RaiseMouseButtonEvent(EventPrivateKey key, MouseButtonEventArgs e) { EventHandlersStore store = EventHandlersStore; if (store != null) { Delegate handler = store.Get(key); if (handler != null) { ((MouseButtonEventHandler)handler)(this, e); } } }
// Helper method to retrieve and fire the InheritedPropertyChanged event internal void RaiseInheritedPropertyChangedEvent(ref InheritablePropertyChangeInfo info) { EventHandlersStore store = EventHandlersStore; if (store != null) { Delegate handler = store.Get(FrameworkElement.InheritedPropertyChangedKey); if (handler != null) { InheritedPropertyChangedEventArgs args = new InheritedPropertyChangedEventArgs(ref info); ((InheritedPropertyChangedEventHandler)handler)(this, args); } } }