1
shouts

Silverlight ClipToBounds - Can I Clip It?, Yes You Can! - Colin Eberhardt

posted by AndrewAndrew 311 days, 4 hours, 27 minutes ago
Tuesday, May 12, 2009 10:49:16 AM GMT

With Silverlight, Panels do not clip their contents by default. See the following example:

Where we have a Grid containing another Grid which itself contains an ellipse, and a Canvas which contains an ellipse:...

Often this is not the desired effect (although it is actually quite a useful feature of Canvas; You can simply add a Canvas to your visual tree without explicitly or implicitly setting its Size and use it as a mechanism for absolute positioning its children).

Fortunately Silverlight provides a Clip property on UIElement, allowing you to provide the clipping geometry for the element:...

category: Silverlight | clicked: 0 | | source: www.scottlogic.co.uk | show counter code
tags: Silverlight

No comments yet, be the first one to post comment.

To post your comment please login or signup