views:

102

answers:

1

Hi Stackoverflow!

I'm currently building a Surface application where the main navigation is a circular menu. For each menu item I'm using a custom control that I found on codeproject.com:

http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx (PiePiece control)

The number of submenu items (which is also piepiece controls) comes from a database and thus dynamically loaded. What I can't figure out is how I add a textblock to this custom control to display the submenu item text. It needs to follow the PiePiece's RotationAngle property to line up correctly.

Anyone got a hot-fix for this? I was thinking about adding another dependencyproperty to the piepiece custom control, but that way I can't set the font-family, size etc (can I?)

Any input on this is greatly appreciated! Thanks!

A: 

Have you tried using an Adorners, without taking a really close look the PiePiece Control you're using this might solve your problem.

Hope that helps!

Chris Nicol
Hi Chris, sorry for the delayed response. Adorners seems like a perfect solution to my problem, however I'm a bit stuck when it comes to binding to the Text property from codebehind.Basically I should be able to do something like this:Binding binding = new Binding("Title");myAdorner.Title = ??Thanks again! :)
bomortensen
found out! ;) thanks a lot, Chris
bomortensen
Not a problem, sorry I missed your comment on the 17th, but glad you figured it out.
Chris Nicol