GeometryGroup Class WPF in VB.NET

In this article you will learn about the GeometryGroup Class of WPF.
  • 2843

As you see an Geometry Classes example in my previous article, Geometry classes includes so many derived classes which is used to create the object of geometry, the geometry object can't create directly because it's an abstract class. Basically Geometry object used to defines the shapes, it defines details such as the coordinates and size of your shape.

GeometryGroup: GeometryGroup is a derived class and we can combine pairs of geometries in a way that forms a single geometry with a whole new shape. The GeometryGroup uses its FillRule property to decide what shapes to fill. In the defining terms GeometryGroup stands to: Adds any number of Geometry objects to a single path, using the EvenOdd or NonZero fill rule to determine what regions to fill.

Example of GeometryGroup

<Window x:Class="Window1"
    Title="Window1" Height="300" Width="300">
    <Path Fill="Blue" Margin="20" Canvas.Top="10" Canvas.Left="50" >
                <RectangleGeometry Rect="0,0 100,100"></RectangleGeometry>
                <EllipseGeometry Center="50,50" RadiusX="35" RadiusY="25"></EllipseGeometry>

Output Window




Hope this is clear you to the GeometryGroup class in WPF. 


More Articles

© 2020 DotNetHeaven. All rights reserved.