Click here to Skip to main content
11,922,320 members (39,469 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# XAML WPF
I want to draw a line shape with diamond or triangle (shaded or shallow) end point.

How can I achieve this please help me.

Thank you.
Posted 27-Jan-13 0:30am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hey Deskul,

Triangle example XAML:

<!-- This polygon shape uses pre-defined color values for its Stroke and
     Fill properties. 
     The SolidColorBrush's Opacity property affects the fill color in 
     this case by making it slightly transparent (opacity of 0.4) so 
     that it blends with any underlying color. -->
    Points="300,200 400,125 400,275 300,200"
       <solidcolorbrush color="Blue" opacity="0.4" />

Daskul 27-Jan-13 5:59am
NO i dont want to create polygon shape.
I want to create a line with a custom shape at its end like this:

----------------> for triangle or ------------------<> for diamond like in the UML diagram aggregation and composition
Edo Tzumer 27-Jan-13 7:19am
You can use a combination of a line & the polygon

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 493
1 Dave Kreskowiak 285
2 Sergey Alexandrovich Kryukov 243
3 Richard MacCutchan 155
4 ppolymorphe 135
0 OriginalGriff 7,231
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,356
3 George Jonsson 2,865
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web03 | 2.8.151120.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100