When designing a WinForms app in visual studio, you can choose to populate a menu bar with the standard set of File, Save, Help, About, etc. Is there a way to do this in WPF using visual studio?
Asked
Active
Viewed 888 times
1 Answers
0
No you must add the menu items youself in wpf, but it is very easy to do, here is an example:
<Menu IsMainMenu="True">
<MenuItem Header="_File" />
<MenuItem Header="_Edit">
<MenuItem Header="_Cut"/>
<MenuItem Header="_Copy"/>
<MenuItem Header="_Paste"/>
</MenuItem>
<MenuItem Header="_View" />
<MenuItem Header="_Window" />
<MenuItem Header="_Help" />
</Menu>
for more detail see - http://www.wpftutorial.net/Menus.html

Eamonn McEvoy
- 8,876
- 14
- 53
- 83
-
The link doesn't mention how to hook up commands and keyboard shortcuts. – Apr 13 '13 at 21:19
-
however: http://stackoverflow.com/questions/10209231/bind-a-keyboard-shortcut-to-a-command-in-the-view-model-in-wpf – Eamonn McEvoy Apr 14 '13 at 13:30
-
@EamonnMcEvoy in WinForms the command :Insert Standart Menu Item..." populate items with the key-shorcut and the icons. – dovid May 25 '15 at 19:36