views:

162

answers:

2

I want to have a MenuItem with the Text property set to "Tom & Jerry" but, as you all know, the '&' before a character tells Windows that the next character is the keyboard shortcut.

So how does one escape the '&' to show up as text in the MenuItem?

+7  A: 

You can use a double, &&, but it will be underscored.

Just tested (Wm 6.1 emulator), and TheTXI had the right guess: 4 ampersands, &&&& did finally show up as 1 single. Wonder who thought that up. Will try it on my HTC Touch next.

Confirmed, my Device and the emulator agree. But the Designer can't be trusted.

Henk Holterman
Brian
P Daddy
TheTXI
Joey
but when I run it in the emulator I get a _ still. Maybe it's not possible on Windows Mobile? It works on Windows, though. Henk gets the answer unless someone can chime in for Windows Mobile.
ageektrapped
That is truly bizarre. But it works! Nice one.
ageektrapped
A: 

I tried the &&, it workd and it wasn't underlined.

Babak Naffas
On Windows Mobile?
Henk Holterman