public MaterialFrame SetFrame(MaterialFrame frame, IBaseSpinner spinner)
        {
            frame = SetFrame(frame);
            if (frame != null)
            {
                RecalculatePosition(spinner);
            }

            return(frame);
        }
        public virtual void RecalculatePosition(IBaseSpinner spinner)
        {
            var frameAnchoredPosition = spinner != null && !spinner.IsDestroyed() && spinner.rectTransform != null?
                                        spinner.rectTransform.TransformPoint(Rect.NormalizedToPoint(spinner.rectTransform.rect, spinner.dropdownExpandPivot) + spinner.dropdownOffset) :
                                            Vector3.zero;

            var spinnerMinSize = spinner.rectTransform != null?spinner.rectTransform.GetProperSize() : Vector2.zero;

            var spinnerPreferredSize = spinner.rectTransform != null ? spinner.dropdownFramePreferredSize : Vector2.zero;

            RecalculatePosition(frameAnchoredPosition, spinner.dropdownFramePivot, spinnerMinSize, spinnerPreferredSize);
        }