Solved

WPF Menu in the style of WMC

Posted on 2009-04-09
6
1,548 Views
Last Modified: 2013-11-12
I'm trying to create and style a custom control that will behave like the menu system in Windows Media Centre.

Specifically I want to recreate the Grid menu you see when browsing files and folders. I've had some ideas, but I keep coming back to which building blocks should I use.. a styled ListBox? a heavily styled TreeView? I really have no clue where to start.

Any help would be appreciated.
0
Comment
Question by:bigdave79
  • 3
  • 3
6 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
Comment Utility
can u post a screen shot of what u want ?... Grid menu you see when browsing files and folders ?
0
 

Author Comment

by:bigdave79
Comment Utility
This is the best screenshot I could find...

http://on10.net/Link/855bae2e-127d-463e-863d-dcdd3d6f76b9/

Essentially, you are presented with a 3 row grid of items. Clicking on an item causes the grid to fade away, and for the contents of that menu item to appear (in the same grid format). Pressing back will bring you back to the main menu.

I'm not using this specifically for Files/Folders. I'd like it to be bindable to any collection if possible.. but we're a long way from that at the moment :)
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
Comment Utility
a stack panel with orientation and a control template to show the items is the best choice i guess.. u can write a trigger for the control template on mouse over to make it animate and move forward while reducing the opacity of the other items..quite a bit of work i wud say ...
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:bigdave79
Comment Utility
The looks I can sort out later, its more the functionality i'm interested in.

I'm not sure how to deal with the multi-level menu aspect. i.e User selects a folder, the folder contains other folders and clicks through to it. User is then presented with the contents of that folder.. and so on.
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
Comment Utility
when we are creating template we can use a hierarchial data template so we can show n levels according to requirement
0
 

Author Comment

by:bigdave79
Comment Utility
I've managed to style the ListBox in the way that I want, now I just need to be able to bind it to an xml file, and behave the way I want.

I've attached a sample piece of xml data that could be used to give my listbox the data. How would I go about making the ListBox drill down.

I.e.
ListBox displays the items "Fruit", "Colours", "Countries.
User selects "Fruit" and the top level items disappear and the fruit items are displayed.

Anyone know how I can implement this behaviour?
<?xml version="1.0" encoding="utf-8" ?>

<GridMenu>

  <Menu Name="Fruit">

    <Menu Name="Apple"/>

    <Menu Name="Orange"/>

    <Menu Name="Banana"/>

    <Menu Name="Apple"/>

  </Menu>

  <Menu Name="Colors">

    <Menu Name="Red" />

    <Menu Name="Yellow" />

    <Menu Name="Blue" />

    <Menu Name="Green" />

  </Menu>

  <Menu Name="Countries">

    <Menu Name="England"/>

    <Menu Name="France"/>

    <Menu Name="Spain"/>

    <Menu Name="Germany"/>

  </Menu>

</GridMenu>

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now