My new Silverlight 3.0 user control: rotating menu

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. 

screenshot rotating menu

The control has 2 public properties:

  1. Radius: sets the radius of the circle.  How bigger the radius, the bigger your circle
  2. 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.

Advertisements

6 Responses to “My new Silverlight 3.0 user control: rotating menu”

  1. jakb Says:

    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?

  2. jakb Says:

    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

  3. marcelo Says:

    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

    • silverlighttwo Says:

      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.

  4. Abhimanyu Says:

    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

    • silverlighttwo Says:

      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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: