Positioning image inside RoundedRectangle

Hi,
We use icons as fonts and the font string value is given as text filed to TextBlock.
This textBlock is added to a RoundedRectangle Panel.
Now the icon is coming out of the parent RoundedRectangle Panel. Pls see the image.
2019-12-07_15h46_58

Is there any way to fix it.
Or you can suggest a common way to handle such cases if the parent panel have round borders.

Can you change the corner radius to match?

It matches, if parameter1 is not provided to RoundedRectangle.
In my case parameter1 has to 10. Any suggestion to handle this?

Yes, that is how to change the corner radius of the “RoundedRectangle” figure. If you do not want to change that, can you change the corner radius of the icon? Maybe change its size?

If the corners do not have the same curve, of course the curves will not match no matter how the two shapes are positioned relative to each other.