Skip to main content
Home Forums Silverlight Programming Programming with .NET - General clip inside the Geometry
2 replies. Latest Post by vitaminutza on August 29, 2008.
(0)
vitaminutza
Member
26 points
16 Posts
08-29-2008 6:25 AM |
Hi,
I'm interesting in obtaining a "frame effect" of a canvas. I'm using the Clip property with a RectangleGeometry, but setting it cuts the canvas around the geometry. I want to obtain a canvas with a "hole" in it, the "hole" being the RectangleGeometry I've set.
Thanks
robhouwe...
Contributor
3158 points
540 Posts
08-29-2008 7:19 AM |
You don't have to do anything for that. If you make your Canvas transparent and lay it on top of the other layers, all other layers will show thru and you have your frame.
(If this has answered your question, please click on mark as answer on this post)Cheers!Rob Houweling
08-29-2008 11:38 AM |
Thanks. I finally got to an end to this using GeometryGroup. It draws a white canvas with a "hole" in it.
<Canvas Width="554" Height="296" Canvas.Left="0" Canvas.Top="0" Background="White"> <Canvas.Clip> <GeometryGroup> <RectangleGeometry x:Name="OutterBorder" Rect="0,0,554,296"/> <RectangleGeometry x:Name="InnerBorder" Rect="0,0,554,296"/> </GeometryGroup> </Canvas.Clip> </Canvas>