CombinedGeometry for Path.Data and DrawingBrush for Path.Fill : Geometry « Windows Presentation Foundation « C# / C Sharp






CombinedGeometry for Path.Data and DrawingBrush for Path.Fill

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>

   
    
    
    
  








Related examples in the same category

1.LineGeometryLineGeometry
2.EllipseGeometry
3.RectangleGeometryRectangleGeometry
4.Animate GeometryDrawing ExamplesAnimate GeometryDrawing Examples
5.Combines two geometries using the XOR combine modeCombines two geometries using the XOR combine mode
6.Combines two geometries using the union combine modeCombines two geometries using the union combine mode
7.Combines two geometries using the exclude combine modeCombines two geometries using the exclude combine mode
8.Geometry Transform for RectangleGeometry Transform for Rectangle
9.Geometry Transform for PathGeometry Transform for Path
10.Geometry Used with a DrawingBrush
11.Geometry Used as a Clip
12.Tiled Geometry
13.Ellipse Geometry DemoEllipse Geometry Demo
14.LineGeometry DemoLineGeometry Demo
15.Use PolyBezierSegment to Simulated CircleUse PolyBezierSegment to Simulated Circle
16.Converting text to geometryConverting text to geometry
17.Use a PathGeometry object to highlight displayed text.Use a PathGeometry object to highlight displayed text.