clip lines

I have a line in a area in a canvas in silverlight.   in a 200X200 area in a canvas i draw a lines but sometimes the lines can appear outside this are.

Can I clip the lines in this area in the canvas so they stay withing the 200X200 boundary? using,c# how do i do this?
Who is Participating?
I know that if you put them inside a scrollviewer, they'll stay within its boundary. So a quick and dirty way of doing this would be to put the lines inside a scrollviewer, the same dimensions as your canvas, with the VerticalScrollBar attribute set to hidden.
jagguyAuthor Commented:
could i use another canvas so i have a nested canvas?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.