Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

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

Follow us on FB

Search

Clipping to Bounds with Geometries and Attached Behaviors

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)

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