/// <summary> /// Creates a new ClawWindowAnimator for the given window. /// </summary> /// <param name="window">The ClawWindow to animate.</param> public ClawWindowAnimator(ClawWindow window) { if (window == null) { throw new ArgumentNullException("window"); } this.window = window; window.IsVisibleChanged += OnIsVisibleChanged; window.SizeChanged += OnSizeChanged; }
/// <summary> /// Creates a new ClawWindowRenderer. /// </summary> /// <param name="window">The window to render.</param> public ClawWindowRenderer(ClawWindow window) { if (window == null) { throw new ArgumentNullException("window"); } this.window = window; window.LocationChanged += OnLocationChanged; window.SizeChanged += OnSizeChanged; RecreateWindowMask(); }
/// <summary> /// Called when the highlights width changed. /// </summary> /// <param name="d">The dependency object. This is the ClawWindow.</param> /// <param name="e">Event arguments.</param> private static void OnHighlightWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ClawWindow window = (ClawWindow)d; window.InvalidateVisual(); }