I’ve just finished a Silverlight 3.0 user control which is a menu. The concept is very simple:
Several items are rotating in a circle. The items are buttons by default, but you can change the ControlTemplate and use an image, mediaelement, rectangle,… as an item. When you click an item, they will stop rotating and be placed in one line. If you click an item again, they go back to their previous status.
The control has 2 public properties:
- Radius: sets the radius of the circle. How bigger the radius, the bigger your circle
- MenuItems: this property asks for a collection of MenuItems. These MenuItems are just buttons with some extra properties. If you change the ControlTemplate of the MenuItem control, you can use anything as a menu item.
You can download this control and the source code from the Expression Gallery. Feedback to improve this control is welcome or let me know if you did some improvements.
August 14, 2009 at 3:30 pm
Hi
I have been playing with your control – cool idea! – and want to create a carousel of hyperlinks
I have tried the following:
The Hyperlink shows up OK but the navigation produces an error
What is the best way to navigate out of the menu?
August 14, 2009 at 3:36 pm
Oops – just answered my own question – I had the control embedded in a navigation frame – lift it out and all works well – thanks for a very useful control
August 18, 2009 at 12:16 am
can I use this control in WPF?¿? or it is just for silverlight..please help….i have been learning…so i am not an expert
August 18, 2009 at 10:40 am
You can’t use this control in WPF, but you can create a new Control Library in WPF and just copy/paste the code from Menu.xaml, Menu.xaml.cs and MenuItem.cs.
If you compile the Library, you should be able to use the control in a WPF Application project.
November 6, 2009 at 6:28 pm
Hi
i want to use this control , can u tell me how to use an image for this control.Can u give the detailed steps
November 18, 2009 at 10:12 pm
I use buttons te create the menu, but you can replace the contentpresenter of the button to anything you want (an image, a mediaelement). More info about changing the look and feel of controls can be found in a blogpost of the one and only almighty Scott 😉
Another option is to open the MenuItem.cs file in the RotatingMenu.Control project and change the base class from Button to Image.