diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-22 17:12:18 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-22 17:12:18 +0200 |
| commit | d71c73171948d29db6dab71e1ca038445d6ab318 (patch) | |
| tree | ada32baf879c02cb38aeed701884421915e6ef5e /Software/Visual_Studio/Tango.SharedUI/Shapes | |
| parent | 3234e33cc4ba354f0395bb514b8b2fa102cf38ec (diff) | |
| download | Tango-d71c73171948d29db6dab71e1ca038445d6ab318.tar.gz Tango-d71c73171948d29db6dab71e1ca038445d6ab318.zip | |
Implemented Developer Module Configuration Section!
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Shapes')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Shapes/Hexagon.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Shapes/Hexagon.cs b/Software/Visual_Studio/Tango.SharedUI/Shapes/Hexagon.cs new file mode 100644 index 000000000..ce256e9b7 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Shapes/Hexagon.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using System.Windows.Shapes; + +namespace Tango.SharedUI.Shapes +{ + public class Hexagon : Shape + { + public Hexagon() : base() + { + this.Stretch = System.Windows.Media.Stretch.Fill; + } + protected override Geometry DefiningGeometry + { + get { return GetGeometry(); } + } + + private Geometry GetGeometry() + { + double sideLength = 100; + double x = Math.Sqrt(sideLength * sideLength / 2); + return Geometry.Parse(String.Format("M {0},0 h {1} l {0},{0} l -{0},{0} h -{1} l -{0},-{0} Z", x, sideLength)); + } + } +} |
