将 MenuStrip 项目文本移动到资源文件中
我正在使用 .NET WinForms (C#) 我有一个带有菜单条控件的表单,我在设计器中添加了菜单项并为其分配了测试,现在我想将此文本移动到资源文件中。我该怎么做?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 Resourcemanager 设置 MenuItem 的字符串。
所以你可以有类似的东西:
You can use Resourcemanager to set the string of the MenuItem.
So you can have something like:
this.stripItem.Text = 全局::your_app_namespace.resource_name.resource_value;
this.stripItem.Text = global::your_app_namespace.resource_name.resource_value;