Skip Navigation LinksHome / Search


Results Per Page

Found 2 results for clip.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • Animating Clipping Paths using Perspective

    0 comments  /  posted by  Silverlight Show  on  Dec 07, 2009 (6 months ago)
    Tags: clip , clipping path animations , Silverlight , Animation

    In this tutorial Alex Knight explains the benefit of clipping paths and how to animate them.

    Animating clipping paths is a great technique to know, it allows you to show sections of an image without moving the whole image. To create a clipping path, place your image on the canvas, create the shape you want for the clipped area, select both objects and right click > Path > Create clipping path.

  • 1 comments  /  posted by  Martin Mihaylov  on  Sep 05, 2008 (more than a year ago)
    Tags: Silverlight , clip

    If you want to add an oval clip to your control, you can do it the following way:


    <Button x:Name="MyButton" Content="Click me!" Width="80" Height="30">
            <EllipseGeometry RadiusX="35" RadiusY="13" Center="40,15"></EllipseGeometry>


    EllipseGeometry myClip = new EllipseGeometry();
    myClip.Center = new Point( MyButton.Width / 2, MyButton.Height / 2 );
    myClip.RadiusX = MyButton.Width / 2;
    myClip.RadiusY = MyButton.Height / 2;
    MyButton.Clip = myClip;

    For the example we use a button. We set the clip using the System.Windows.Media.EllipseGeometry object. The center is in relation to the size of the button. In this case we have a button with height 30 and width 80. The center of the button will be with coordinates (40,15). We set the center of the clip to the center of the rectangle. Of course we can set it anywhere we want. We use the RadiusX and RadiusY properties to define the size.

    Without clip

    With clip

    That's it!

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)