Here in this blog I am explaining that how we can Rotate a PolyLine with only some Lines of code in WPF. If we want to Rotate a PolyLine then we need a Canvas, PolyLine and Some Methods related to PolyLine.

<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width
="525">
<Canvas>
<Polyline Canvas.Left="100" Canvas.Top="20" Stroke="Black" StrokeThickness="4"
Points="20,20 110,0 110,110 0,110 0,30 90,30 90,90 30,90, 130,150 70,50 170,70 50,70" >
<Polyline.LayoutTransform>
<RotateTransform Angle="45" CenterX="50" CenterY="50"/>
</Polyline.LayoutTransform>
</Polyline>
</Canvas>
</
Window>

In this example we have used Layout Transform.