Edit this page
Available for: UI for ASP.NET AJAX | UI for ASP.NET MVC | UI for WPF | UI for WinForms | UI for Silverlight


Clipping is a content element that can be used to define the outline of other content elements like Image and Path.

Creating a Clipping

The Clipping element exposes a single property.

  • Clip: Property of type GeometryBase representing the Geometry that is used to clip the content element.

Example 1 demonstrates how you can create a Clipping element and assign a RectangeGeometry to its Clip property.

[C#] Example 1: Create clipping

Clipping clipping = new Clipping();
clipping.Clip = new RectangleGeometry(new Rect(5, 5, 50, 50));

Using Clipping

All inheritors of the ContentElementBase class expose a Clipping property. Setting it clips the respective content element with the specified clipping.

Example 2 demonstrates how to clip an image using the Clipping created in Example 1.

[C#] Example 2: Use clipping

Image image = container.Content.AddImage(imageSource);
image.Clipping = clipping;

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article