Some people have had issues trying to make 'popup menus' in Media Center applications.
Since I've been adding a similar function to EMUCenter to support some of the new features, I thought I'd cover how to do it. The answer is actually very straight-forward.
The main problem with pop-up menus is the fact that they tend to pop-up over your existing interface, and Media Center isn't particularly good at dealing with overlapping objects and managing focus. In fact, you should avoid overlapping objects in Media Center at all costs, since it can cause some slightly unusual effects, and different focus rules for different input devices (eg. if you have overlap, the remote control tends to focus on the smallest or closest item when you navigate, while the mouse tends to focus on the largest.
So - you have to stop focus from falling onto any of the controls 'beneath' your popup. Many people try to do this by creating an invisible panel control that covers the entire screen, with the idea being that it is a single object that should 'catch' the focus. By setting the Navigation policy to 'ContainAll', you'd imagine that it would prevent anything else from getting focus.
Unfortunately, it doesn't really work like that, although this solution MAY work for the mouse, it doesn't work for the keyboard/remote.
The other technique people use is trying to use the Navigation policy of your popup menu to prevent objects outside the menu from being selected. While this can work for your remote/keyboard, it won't prevent your mouse from changing the focus.
So, what's the best solution?
It's actually pretty simple. In all of your objects that respond to mouse focus, you'll have a Default rule that either turns 'KeyInteractive' on, or sets a property that turns it on for you, such as MakeTopMostOnFocus.
All you have to do is make a shared variable - such as a BooleanChoice - that you use to store if a popup is visible, and then turn the KeyInteractive property on and off based on this variable.
For example, I have a string called "PopupName" on the main class of my application. Whenever the string is empty, all of my main interface items have their KeyInteractive property set to true. But as soon as that text becomes something other than an empty string, all of my objects (other than in the menu itself, of course!) become NON-interactive.
For example:
<Condition Source="[MyApp.PopupName]" SourceValue="">
<Actions>
<Set Target="[Input.KeyInteractive]" Value="true"/>
</Actions>
</Condition>
<Condition Source="[MyApp.PopupName]" SourceValue="" ConditionOp="NotEquals">
<Actions>
<Set Target="[Input.KeyInteractive]" Value="false"/>
</Actions>
</Condition>