Overlapping Rectangles : Path « Windows Presentation Foundation « C# / C Sharp






Overlapping Rectangles

Overlapping Rectangles
   

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Path Fill="Gold" Stroke="Red" StrokeThickness="3">
        <Path.Data>
            <RectangleGeometry Rect="96 96 192 192" />
        </Path.Data>
    </Path>

    <Path Fill="Blue" Stroke="Red" StrokeThickness="3">
        <Path.Data>
            <RectangleGeometry Rect="192 192 192 192" />
        </Path.Data>
    </Path>

    <Path Fill="Red" Stroke="Red" StrokeThickness="3">
        <Path.Data>
            <GeometryGroup>
                <RectangleGeometry Rect="480 96 192 192" />
                <RectangleGeometry Rect="576 192 192 192" />
            </GeometryGroup>
        </Path.Data>
    </Path>

</Canvas>

   
    
    
  








Related examples in the same category

1.Multiple Subpaths with PathFigureMultiple Subpaths with PathFigure
2.Close Path Command with PathFigureClose Path Command with PathFigure
3.Drawn with a Path Shape with Geometry
4.Vertical LineVertical Line
5.Horizontal LineHorizontal Line
6.Cubic Bezier Curve with BezierSegmentCubic Bezier Curve with BezierSegment
7.Line with PathGeometryLine with PathGeometry
8.Elliptical ArcElliptical Arc
9.Quadratic Bezier Curve with PathFigureQuadratic Bezier Curve with PathFigure
10.Creates a composite shape from three geometries. This GeometryGroup has a FillRule of NonZeroCreates a composite shape from three geometries. This GeometryGroup has a FillRule of NonZero
11.Creates a composite shape from three geometriesCreates a composite shape from three geometries
12.Multiple SubpathsMultiple Subpaths
13.Close Path CommandClose Path Command
14.Elliptical Arc PathElliptical Arc Path
15.Vertical Line with PathVertical Line with Path
16.Horizontal Line with PathHorizontal Line with Path
17.Line with PathLine with Path
18.Combines two geometries using the intersect combine modeCombines two geometries using the intersect combine mode
19.Transform Path defined in Resource
20.Difference between CounterClockwise and ClockwiseDifference between CounterClockwise and Clockwise
21.Path gradient and BezierPath gradient and Bezier
22.Path Angle Animated Button
23.Path Animated ButtonPath Animated Button
24.Squaring The CircleSquaring The Circle
25.Single BezierSingle Bezier
26.Overlapping StarsOverlapping Stars
27.Path Mini LanguagePath Mini Language
28.Multiple Line SegmentsMultiple Line Segments
29.Figure With Arcs
30.Counterclockwise (default), small arc (default)Counterclockwise (default), small arc (default)
31.Counterclockwise (default), IsLargeArcCounterclockwise (default), IsLargeArc
32.Clockwise, small arc (default)Clockwise, small arc (default)
33.Clockwise, IsLargeArcClockwise, IsLargeArc
34.Eclipse SunEclipse Sun
35.Mini Language Infinity
36.Large ArcSegmentsLarge ArcSegments
37.Small ArcSegmentSmall ArcSegment
38.Bezier Curve with BezierSegmentBezier Curve with BezierSegment
39.PolyBezierSegment DemoPolyBezierSegment Demo
40.Multiple geometriesMultiple geometries
41.Combined geometries GeometryCombineMode=ExcludeCombined geometries GeometryCombineMode=Exclude
42.Path.Data with LineSegmentPath.Data with LineSegment
43.Path Margin as resourcePath Margin as resource
44.Shorthand Path dataShorthand Path data
45.Path with ShadowPath with Shadow