/// <summary>
        /// Returns the bounding box of the content.
        /// </summary>
        internal override Rect GetContentBounds()
        {
            if (_content != null)
            {
                Rect         resultRect        = Rect.Empty;
                MediaContext mediaContext      = MediaContext.From(Dispatcher);
                BoundsDrawingContextWalker ctx = mediaContext.AcquireBoundsDrawingContextWalker();

                resultRect = _content.GetContentBounds(ctx);
                mediaContext.ReleaseBoundsDrawingContextWalker(ctx);

                return(resultRect);
            }
            else
            {
                return(Rect.Empty);
            }
        }