Multiple Subpaths with PathFigure : Path « Windows Presentation Foundation « C# / C Sharp






Multiple Subpaths with PathFigure

Multiple Subpaths with PathFigure
   
<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">
            <Path.Data>
              <PathGeometry>
                <PathGeometry.Figures>
                  <PathFigureCollection>
                    <PathFigure IsClosed="True" StartPoint="10,100">
                      <PathFigure.Segments>
                        <PathSegmentCollection>
                          <LineSegment Point="100,100" />
                          <LineSegment Point="100,50" />
                        </PathSegmentCollection>
                      </PathFigure.Segments>
                    </PathFigure>
                    <PathFigure IsClosed="True" StartPoint="10,10">
                      <PathFigure.Segments>
                        <PathSegmentCollection>
                          <LineSegment Point="100,10" />
                          <LineSegment Point="100,40" />
                        </PathSegmentCollection>
                      </PathFigure.Segments>
                    </PathFigure>                    
                  </PathFigureCollection>
                </PathGeometry.Figures>
              </PathGeometry>
            </Path.Data>
          </Path>
       
   </Canvas> 


</Window>

   
    
    
  








Related examples in the same category

1.Close Path Command with PathFigureClose Path Command with PathFigure
2.Drawn with a Path Shape with Geometry
3.Vertical LineVertical Line
4.Horizontal LineHorizontal Line
5.Cubic Bezier Curve with BezierSegmentCubic Bezier Curve with BezierSegment
6.Line with PathGeometryLine with PathGeometry
7.Elliptical ArcElliptical Arc
8.Quadratic Bezier Curve with PathFigureQuadratic Bezier Curve with PathFigure
9.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
10.Creates a composite shape from three geometriesCreates a composite shape from three geometries
11.Multiple SubpathsMultiple Subpaths
12.Close Path CommandClose Path Command
13.Elliptical Arc PathElliptical Arc Path
14.Vertical Line with PathVertical Line with Path
15.Horizontal Line with PathHorizontal Line with Path
16.Line with PathLine with Path
17.Combines two geometries using the intersect combine modeCombines two geometries using the intersect combine mode
18.Transform Path defined in Resource
19.Difference between CounterClockwise and ClockwiseDifference between CounterClockwise and Clockwise
20.Path gradient and BezierPath gradient and Bezier
21.Path Angle Animated Button
22.Path Animated ButtonPath Animated Button
23.Squaring The CircleSquaring The Circle
24.Single BezierSingle Bezier
25.Overlapping StarsOverlapping Stars
26.Path Mini LanguagePath Mini Language
27.Overlapping RectanglesOverlapping Rectangles
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