Ployline types do not require connecting ends

image_pdfimage_print


   
     
<Window x:Class="WpfApplication1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WpfApplication1" Height="352" Width="334" WindowStartupLocation="CenterScreen">
    <StackPanel>
    <Polyline Stroke ="Red" StrokeThickness ="20" StrokeLineJoin ="Round" 
                 Points ="10,10   40,40  10,90   300,50"/>
    </StackPanel>
</Window>

   
    
    
    
    
     


Polyline and Polyline.Points

image_pdfimage_print


   
     
<Window x:Class="WpfApplication1.ShapesWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ShapesWindow" Height="160" Width="400">
    <Canvas>
        <Polyline Stroke="Brown" StrokeThickness="4" StrokeDashArray="1 1" Canvas.Left="119" Canvas.Top="170" >
            <Polyline.Points>
                <Point X="0" Y="0"/>
                <Point X="30" Y="30"/>
                <Point X="60" Y="20"/>
                <Point X="100" Y="50"/>
            </Polyline.Points>
        </Polyline>
    </Canvas>
</Window>

   
    
    
    
    
     


PolyLine Segment Demo

image_pdfimage_print


   
     

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

    <Path Fill="Aqua" Stroke="Maroon" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="144 72" IsClosed="True">
                    <PolyLineSegment Points="200 246, 53 138, 235 138, 88 246" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

   
    
    
    
    
     


XAML Button with Polyline and Label

image_pdfimage_print


   
     

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        Title="Design XAML Button"
        SizeToContent="WidthAndHeight"
        ResizeMode="CanMinimize">
    <Button HorizontalAlignment="Center"
            VerticalAlignment="Center" 
            Margin="24">
        <StackPanel>
            <Polyline Stroke="Black"
                      Points="0 10,10 0,20 10,30 0,40 10,50 0,
                        60 10,70 0,80 10,90 0,100 10" />

            <Image Margin="0,10,0,0"
                   Source="c:image.ICO" 
                   Stretch="None" />

            <Label HorizontalAlignment="Center">
                _Read
            </Label>

            <Polyline Stroke="Black"
                      Points="0 0,10 10,20 0,30 10,40 0,50 10,
                        60 0,70 10,80 0,90 10,100 0" />
        </StackPanel>
    </Button>
</Window>

   
    
    
    
    
     


Add Polyline to UniformGrid

image_pdfimage_print


   
     

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="300" Width="400">
    <UniformGrid Columns="3" HorizontalAlignment="Center" VerticalAlignment="Center">
        <Polyline Margin="10" Stroke="Black" StrokeThickness="5" Points="110,0 120,0 100,130 0,300 0,20 180,120 80,180 20,180, 210,410 610,410 610,610 40,60" />
    </UniformGrid>
</Window>

   
    
    
    
    
     


Set Margin and Stroke for Polyline

image_pdfimage_print


   
     

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="300" Width="400">
    <UniformGrid Columns="3" HorizontalAlignment="Center" VerticalAlignment="Center">
        <Polyline Margin="10" Stroke="Black" StrokeThickness="5" Points="110,0 120,0 100,130 0,300 0,20 180,120 80,180 20,180, 210,410 610,410 610,610 40,60" />
    </UniformGrid>
</Window>