Adding a textblock to a custom wpf control (piepiece control from codeplex)
Posted
by bomortensen
on Stack Overflow
See other posts from Stack Overflow
or by bomortensen
Published on 2010-05-11T07:31:45Z
Indexed on
2010/05/11
7:34 UTC
Read the original article
Hit count: 221
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!
© Stack Overflow or respective owner