<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.SampleViewer"
Title=" Examples" >
<Canvas>
<Rectangle Height="200" Width="200" Stroke="Black" StrokeThickness="1"
HorizontalAlignment="Left">
<Rectangle.Fill>
<DrawingBrush Viewbox="0,0,200,200" ViewboxUnits="Absolute">
<DrawingBrush.Drawing>
<GeometryDrawing Brush="#CCCCFF">
<GeometryDrawing.Pen>
<Pen Thickness="1" Brush="Black" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="50,5 100,10" />
<RectangleGeometry Rect="50,175 100,10" />
<PathGeometry>
<PathGeometry.Figures>
<PathFigureCollection>
<PathFigure IsClosed="true" StartPoint="50,50">
<PathFigure.Segments>
<PathSegmentCollection>
<BezierSegment Point1="175,300" Point2="625,100" Point3="150,50"/>
<BezierSegment Point1="275,300" Point2="725,100" Point3="250,50"/>
<BezierSegment Point1="375,300" Point2="825,100" Point3="350,50"/>
<BezierSegment Point1="475,300" Point2="925,100" Point3="450,50"/>
<BezierSegment Point1="575,300" Point2="125,100" Point3="550,50"/>
<BezierSegment Point1="625,300" Point2="115,100" Point3="50,50"/>
</PathSegmentCollection>
</PathFigure.Segments>
</PathFigure>
</PathFigureCollection>
</PathGeometry.Figures>
</PathGeometry>
</GeometryGroup>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Canvas>
</Window>
ASP.NET & Csharp (C#)
ASP.NET & Csharp (C#) , Here you can find my posts about .NET c# .
Geometry Transform for Path
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Path Canvas.Left="300" Canvas.Top="100" Stroke="Red">
<Path.Data>
<RectangleGeometry Rect="0 0 10 10"
Transform="10 0 0 10 0 0" />
</Path.Data>
</Path>
</Canvas>
Geometry Transform for Rectangle
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Rectangle Canvas.Left="100" Canvas.Top="100" Stroke="Red"
Width="10" Height="10"
RenderTransform="10 0 0 10 0 0" />
</Canvas>
Combines two geometries using the exclude combine mode
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.SampleViewer"
Title=" Examples" >
<Canvas>
<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Exclude">
<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>
</Canvas>
</Window>
Combines two geometries using the union combine mode
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.SampleViewer"
Title="Opacity Masking Examples" >
<Canvas>
<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
<Path.Data>
<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>
</Canvas>
</Window>
Combines two geometries using the XOR combine mode
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.SampleViewer"
Title="Opacity Masking Examples" >
<Canvas>
<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Xor">
<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>
</Canvas>
</Window>
CombinedGeometry for Path.Data and DrawingBrush for Path.Fill
<Window x:Class="Workspace.DockExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Workspace" Width="640" Height="480">
<Path Stretch="Uniform" Margin="15,0,0,0">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Union">
<CombinedGeometry.Geometry1>
<RectangleGeometry Rect="50,70 100 100" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<EllipseGeometry Center="100,70" RadiusX="35" RadiusY="40"/>
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
<Path.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<ImageDrawing ImageSource="c:image.JPG">
<ImageDrawing.Rect>
<Rect X="100" Y="100" Width="50" Height="50" />
</ImageDrawing.Rect>
</ImageDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Path.Fill>
</Path>
</Window>