Skip to content

markheath/wpfshapes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Description

WPF Shapes is a small library of useful shape controls for WPF that resize nicely to the space available. Currently it includes:

  • Hexagon
  • Diamond
  • Triangle
  • Rounded Sides Rectangle
  • Chevron
  • Speech Bubble
  • Label (Rectangle with top left and bottom left corners cut off)

Usage

Add a reference to the WpfShapes DLL. Easiest way is with NuGet. Add a namespace directive to your XAML:

<Window ...
xmlns:shapes="clr-namespace:WpfShapes;assembly=WpfShapes">

Then you can declare shapes in XAML. For example the diamond shape:

<shapes:Diamond Stroke="Crimson" StrokeThickness="5" Fill="BlanchedAlmond" />

The Label shape has an optional CornerWidth property:

<shapes:Label Stroke="DarkMagenta" Fill="LightPink" StrokeThickness="5" Margin="2" />

The Triangle shape has an enumeration of compass points to specify which direction the triangle points:

<shapes:Triangle Stroke="DarkBlue" Fill="AliceBlue" StrokeThickness="5" Margin="2" TriangleOrientation="SW" />

Contributing

I welcome any code contributions of new shapes or improvements to existing shapes. Just fork the repository and issue a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published