private void UpdateBackground(CustomEntry CustomEntry) { if (_renderer != null) { _renderer.Dispose(); _renderer = null; } _renderer = new BorderRenderer(); Control.Background = _renderer.GetBorderBackground(CustomEntry.BorderColor, CustomEntry.BackgroundColor, CustomEntry.BorderWidth, CustomEntry.BorderRadius); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_renderer != null) { _renderer.Dispose(); _renderer = null; } } }