public void SetParent(object parentElement)
        {
            if (parentElement is null)
            {
                throw new ArgumentNullException(nameof(parentElement));
            }
            if (!(parentElement is MC.VisualElement parentVisualElement))
            {
                throw new ArgumentNullException(nameof(parentElement), $"Expected parent to be of type '{typeof(MC.VisualElement).FullName}' but it is of type '{parentElement.GetType().FullName}'.");
            }
            _parentVisualElement = parentVisualElement;

            UpdateParentStyleSheetIfPossible();
        }