GeometryGroup class

Applies to Windows and Windows Phone

Represents a composite geometry, composed of other Geometry objects.

Inheritance

Object
  DependencyObject
    Geometry
      GeometryGroup

Syntax


public sealed class GeometryGroup : Geometry


<GeometryGroup>
  oneOrMoreGeometries
</GeometryGroup>

XAML Values

oneOrMoreGeometries

One or more object elements that derive from Geometry. Typically, these are any combination of the classes EllipseGeometry, GeometryGroup, LineGeometry, PathGeometry, and RectangleGeometry. Object elements defined here become members of the Children collection when code accesses the Children property at run time.

Attributes

[ContentProperty("Name=Children")]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The GeometryGroup class has these types of members:

Constructors

The GeometryGroup class has these constructors.

ConstructorDescription
GeometryGroup Initializes a new instance of the GeometryGroup class.

 

Methods

The GeometryGroup class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The GeometryGroup class has these properties.

PropertyAccess typeDescription

Bounds

Read-onlyGets a Rect that specifies the axis-aligned bounding box of the Geometry. (Inherited from Geometry)

Children

Read/writeGets or sets the GeometryCollection that contains the objects that define this GeometryGroup.

ChildrenProperty

Read-onlyIdentifies the Children dependency property.

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

FillRule

Read/writeGets or sets how the intersecting areas of the objects contained in this GeometryGroup are combined.

FillRuleProperty

Read-onlyIdentifies the FillRule dependency property.

Transform

Read/writeGets or sets the Transform object applied to a Geometry. (Inherited from Geometry)

 

Examples

Composite geometry objects can be created using a GeometryGroup. The GeometryGroup object creates an amalgamation of the Geometry objects it contains without combining their area. Any number of Geometry objects can be added to a GeometryGroup. This example uses a GeometryGroup to create a composite geometry.


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

            <!-- Creates a composite shape from three geometries. -->
            <GeometryGroup FillRule="EvenOdd">
                <LineGeometry StartPoint="10,10" EndPoint="50,30" />
                <EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
                <RectangleGeometry Rect="30,55 100 30" />
            </GeometryGroup>
        </Path.Data>
    </Path>
</Canvas>


Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media
Windows::UI::Xaml::Media [C++]

Metadata

Windows.winmd

See also

Geometry

 

 

Show:
© 2014 Microsoft