protected virtual void Dispose(bool disposing) { if (this.disposed) { return; } this.disposed = true; if (disposing) { this.UnregisterAllEvents(); OverlayRectangleWindow.CloseCurrent(); } }
/// <summary> /// Draw a highlight around the element with the given settings. /// </summary> /// <param name="blocking">Flag to indicate if further execution waits until the highlight is removed.</param> /// <param name="color">The color to draw the highlight.</param> /// <param name="duration">The duration (im ms) how long the highlight is shown.</param> public UiElement DrawHighlight(bool blocking, WpfColor color, TimeSpan duration) { var rectangle = this.Bounds; if (!rectangle.IsZeroes()) { if (blocking) { OverlayRectangleWindow.ShowBlocking(rectangle, color, duration); } else { OverlayRectangleWindow.Show(rectangle, color, duration); } } return(this); }