Reputation: 5236
I have a Grid
and I'd like to apply a Clip
( I provide Path
Data
) to anything that is inside the Grid
. For e.g., if I have an image inside the grid, I need the image to be clipped to a custom shape. How can I achieve this?
Upvotes: 1
Views: 332
Reputation: 70142
Yes, you can set the Clip
property on the Grid
to the geometry that you want to clip to. Alternatively, there is an attached behaviour described in the following blog post:
http://www.scottlogic.co.uk/blog/colin/2009/05/silverlight-cliptobounds-can-i-clip-it-yes-you-can/
That can be used as follows:
<Grid util:Clip.ToBounds="true">
Upvotes: 1