Reputation: 2245
I am using .NET WinForms (C#) I have a form with a menustrip control in it, I added menu items in the designer and assigned test to them, now I want to move this text into a resource file. how do I do that ?
Upvotes: 0
Views: 545
Reputation: 21
Upvotes: 0
Reputation: 3917
You can use Resourcemanager to set the string of the MenuItem.
So you can have something like:
MenuItem topLevel = mainMenu.MenuItems.Add("&XXX");
MenuItem first = new MenuItem();
first.Text = [Text from ResourceManager]
topLevel.MenuItems.Add(new MenuItem("&New"));
Upvotes: 1