Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

GeometryCombineMode Enumeration

Specifies the different methods by which two geometries can be combined.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
public enum GeometryCombineMode
<object property="enumerationMemberName" .../>
Member nameDescription
ExcludeThe second region is excluded from the first. Given two geometries, A and B, the area of geometry B is removed from the area of geometry A, producing a region that is A-B.
IntersectThe two regions are combined by taking their intersection. The new area consists of the overlapping region between the two geometries.
UnionThe two regions are combined by taking the union of both. The resulting geometry is geometry A + geometry B.
XorThe two regions are combined by taking the area that exists in the first region but not the second and the area that exists in the second region but not the first. The new region consists of (A-B) + (B-A), where A and B are geometries.

The following illustration shows the different geometry combine modes.

Geometry Combine Modes

Different combine modes applied to two geometries

The following example shows how to combine two geometries using the Union combine mode.

<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
  <Path.Data>

    <!-- Combines two geometries using the union combine mode. -->
    <CombinedGeometry GeometryCombineMode="Union">
      <CombinedGeometry.Geometry1>
        <EllipseGeometry RadiusX="50" RadiusY="50" Center="75,75" />
      </CombinedGeometry.Geometry1>
      <CombinedGeometry.Geometry2>
        <EllipseGeometry RadiusX="50" RadiusY="50" Center="125,75" />
      </CombinedGeometry.Geometry2>
    </CombinedGeometry>
  </Path.Data>
</Path>

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.