clip lines

Posted on 2009-02-18
Last Modified: 2013-11-12
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?
Question by:jagguy
    LVL 9

    Accepted Solution

    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.

    Author Comment

    could i use another canvas so i have a nested canvas?

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now