All Visual Studio blogs in one place

AddThis Social Bookmark Button
While working on my Radar control, I found that I had the need to clip the contents of a rectangular Panel by a bounding ellipse.  In Silverlight, that’s a very trivial task:
The XAML above clips every child inside the Canvas that is not contained by the EllipseGeometry.  But it’s a very common case that you won’t know the dimensions of the containing Canvas until runtime.  Even worse, your canvas dimensions may change multiple times during runtime. We need some way to update the EllipseGeometry during runtime.  Sure, you could easily write some one-off code to do this, but it’s better if we can encapsulate the logic so that it can be re-used. ...(Read whole news on source site)



Enter your email address:

Delivered by FeedBurner

Increase your website traffic with


Anti-spam: How many eyes has a typical person?

Follow us on FB

Home : Blog List : Page Brooks : Clipping to Bounds with Geometries and Attached Behaviors