Skip to main content

Microsoft Silverlight

Answered Question clip inside the GeometryRSS Feed

(0)

vitaminutza
vitaminutza

Member

Member

26 points

16 Posts

clip inside the Geometry

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 

robhouweling
robhouwe...

Contributor

Contributor

3158 points

540 Posts

Silverlight MVP

Re: clip inside the Geometry

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



My blog

vitaminutza
vitaminutza

Member

Member

26 points

16 Posts

Answered Question

Re: clip inside the Geometry

 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>

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities