Click here to Skip to main content
Licence CPOL
First Posted 26 Jan 2008
Views 21,354
Downloads 298
Bookmarked 30 times

WPF PolarPanel

By | 26 Jan 2008 | Article
A WPF panel for easily positioning elements in polar coordinates
PolarPanel.jpg

Introduction

The PolarPanel is a WPF derived Panel which allows easy positioning of elements in polar coordinates. With polar coordinates, instead of setting X and Y, you set Angle and Radius for each child element.

Using the Code

Coordinate setting is done by setting the attached Angle and Radius properties of the PolarPanel class on a child element.

  • Angle (in degrees) specifies the angle between the positive X line and the line between the panel center and element center.
  • Radius specifies the distance between panel center and element center.

For example:

<panels:PolarPanel> 
    <Button Content="12" panels:PolarPanel.Angle="90" panels:PolarPanel.Radius="50" /> 
    <Button Content="1" panels:PolarPanel.Angle="60" panels:PolarPanel.Radius="50" /> 
    <Button Content="2" panels:PolarPanel.Angle="30" panels:PolarPanel.Radius="50" /> 
...
</panels:PolarPanel>

History

  • 26th January, 2008: Initial post

License

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

About the Author

Yaakov Davis

Software Developer

Israel Israel

Member

Experienced in .Net, C#, WPF, user experience.
 
Read my blog: http://uxoriented.blogspot.com/

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalcontextmenu Pinmembercechode18:45 15 Jul '08  
GeneralRe: contextmenu PinmemberYaakov Davis19:22 15 Jul '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 26 Jan 2008
Article Copyright 2008 by Yaakov Davis
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid