Solved

WPF Menu in the style of WMC

Posted on 2009-04-09
6
1,551 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why, and when, to use Windows Workflow 1 32
Different Delete Messages 7 37
C# Single Form 8 27
Reset asp.net login password 4 29
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

20 Experts available now in Live!

Get 1:1 Help Now