Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Rotate a PloyLine in WPF
WhatsApp
Shalini Juneja
14y
7.8
k
0
0
25
Blog
PolyLine.zip
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.
People also reading
Membership not found