/// <inheritdoc />
            public override void OnDestroy()
            {
                if (_currentDialog != null)
                {
                    _currentDialog.ClosePicker();
                    _currentDialog = null;
                }

                base.OnDestroy();
            }
            /// <inheritdoc />
            public override bool OnMouseDoubleClick(Vector2 location, MouseButton button)
            {
                if (base.OnMouseDoubleClick(location, button))
                {
                    return(true);
                }

                if (button == MouseButton.Left)
                {
                    // Show color picker dialog
                    _currentDialog = ColorValueBox.ShowPickColorDialog?.Invoke(this, Gradient._data[Index].Value, OnColorChanged);
                    return(true);
                }

                return(false);
            }