Is it possible to visually contain a XAML transform?
Posted on 2015-01-27
Example of an issue, consider a XAML user control 100 wide and high with a rectangle 100 wide and high within it. When a RenderTransform is applied to rotate the rectangle 90 degrees the visual effect is for the rectangle to extend outside of the bounds of the user control as it rotates.
Is there a way to contain this behaviour so that the visual effect does not 'bleed' into surrounding controls? i.e. enforce the bounds of the user control.
For this example the desired effect of the rotation would be to crop the corners of the rectangle as they passed out side of the bounds of the user control.