/// <summary> /// Obtains the current bounds of the brush's content /// </summary> /// <param name="contentBounds"> Output bounds of content</param> protected override void GetContentBounds(out Rect contentBounds) { // Obtain the current visual's outer space bounding box. We return the outer space // bounding box because we want to have the bounding box of the Visual tree including // transform/offset at the root. if (_isCacheDirty) { _bbox = Visual.CalculateSubgraphBoundsOuterSpace(); _isCacheDirty = false; } contentBounds = _bbox; }