Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a & in a menuitem or menustrip

I have a menu item that needs to be formated like This & That, but the & is converted to an underscore. Is there an escape character to actually be able to display the &?

like image 337
Pieces Avatar asked Oct 25 '25 11:10

Pieces


1 Answers

Just double the '&' character

menuItem.Text = "Foo && Bar";
like image 170
Thomas Levesque Avatar answered Oct 28 '25 00:10

Thomas Levesque



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!