Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • Bill Reiss

    Bill Reiss

    Contributor

    4973 Points

    947 Posts

    Re: c# clip property

    May 09, 2007 12:21 PM | LINK

    Something like this works for me...

    Canvas c = ir.FindName("canvas") as Canvas;

    RectangleGeometry rg = new RectangleGeometry();

    rg.Rect = new Rect(0, 0, 48,48);

    c.Clip = rg;

    In my case, the canvas wraps the image, so I'm not sure if you would need to do something similar or clip the image itself.


    Bill Reiss, Coauthor of Hello! Silverlight
    My blog