Solved

WPF Menu in the style of WMC

Posted on 2009-04-09
6
1,560 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 29

Expert Comment

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

Author Comment

by:bigdave79
ID: 24107090
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
ID: 24107125
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bigdave79
ID: 24107192
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
ID: 24107260
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
ID: 24183711
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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