我正在编写一个备份工具。在我的工具之上,我有一个包含两个工具条菜单项的菜单条。我根据我的期望稍微改变了颜色。不集中菜单看起来很棒:
当我现在单击菜单项“文件”以打开上下文菜单时,颜色变为白色,我无法再阅读文本:
谁能告诉我在哪里可以改变这种行为?我使用 Visual Studio 2013 Ultimate,Windows 窗体应用程序,代码在 C# 中。
这是代码:
//
// initializing menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.Color.MediumBlue;
this.menuStrip1.BackgroundImageLayout =
System.Windows.Forms.ImageLayout.Center;
this.menuStrip1.Font = new System.Drawing.Font("Segoe UI Semilight",
15.75F, System.Drawing.FontStyle.Regular,
//
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.MinimumSize = new System.Drawing.Size(0, 40);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1056, 40);
this.menuStrip1.TabIndex = 77;
this.menuStrip1.Text = "menuStrip1";
//
// initializing fileToolStripMenuItem and adding to menuStrip1
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
this.loadToolStripMenuItem});
this.fileToolStripMenuItem.Font = new System.Drawing.Font("Calibri Light",
15.75F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.fileToolStripMenuItem.ForeColor =
System.Drawing.SystemColors.ControlLightLight;
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(54, 36);
this.fileToolStripMenuItem.Text = "File";
this.fileToolStripMenuItem.Click += new System.EventHandler
(this.fileToolStripMenuItem_Click);
//
// initializing saveToolStripMenuItem and adding to fileToolStripMenuItem
//
this.saveToolStripMenuItem.BackColor = System.Drawing.Color.MediumBlue;
this.saveToolStripMenuItem.ForeColor =
System.Drawing.SystemColors.ControlLightLight;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(166, 30);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler
(this.saveToolStripMenuItem_Click);