public BackgroundFader(UserControl control, Color color_focussed, Color color_unfocussed) { WPFDoEvents.AssertThisCodeIsRunningInTheUIThread(); this.control = control; this.color_focussed = color_focussed; this.color_unfocussed = color_unfocussed; this.control.Background = new SolidColorBrush(color_unfocussed); this.control.MouseEnter += DocumentNodeContentControl_MouseEnter; this.control.MouseLeave += DocumentNodeContentControl_MouseLeave; }
public WeakDependencyPropertyChangeNotifier(DependencyObject propertySource, PropertyPath property) { WPFDoEvents.AssertThisCodeIsRunningInTheUIThread(); if (null == propertySource) { throw new ArgumentNullException("propertySource"); } if (null == property) { throw new ArgumentNullException("property"); } _propertySource = new WeakReference(propertySource); Binding binding = new Binding(); binding.Path = property; binding.Mode = BindingMode.OneWay; binding.Source = propertySource; BindingOperations.SetBinding(this, ValueProperty, binding); }
public AugmentedPopupAutoCloser(Popup popup) { WPFDoEvents.AssertThisCodeIsRunningInTheUIThread(); this.popup = popup; }