Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No menustrip/toolstrip support #137

Open
worstastronomer343 opened this issue Jul 2, 2022 · 0 comments
Open

No menustrip/toolstrip support #137

worstastronomer343 opened this issue Jul 2, 2022 · 0 comments

Comments

@worstastronomer343
Copy link

Hi,

Among the controls you have listed, there is no MenuStrip or ToolStrip with a Metro UI look and feel.

However, a quick Google search revealed this Stack Overflow page that does give a guide as to how to roll your own:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ModernUISample.metro
{
    /// <summary>
    /// Menustrip for ModernUI-GUIs
    /// </summary>
    public class MetroMenuStrip : System.Windows.Forms.MenuStrip
    {
        /// <summary>
        /// Constructor
        /// </summary>
        public MetroMenuStrip()
            : base()
        {
            Renderer = new MetroToolStripRenderer();
            Font = MetroUI.Style.BaseFont;
            ForeColor = MetroUI.Style.ForeColor;
        }

        /// <summary>
        /// OnItemAdded-Event we adjust the font and forecolor of this item
        /// </summary>
        /// <param name="e"></param>
        protected override void OnItemAdded(System.Windows.Forms.ToolStripItemEventArgs e)
        {
            base.OnItemAdded(e);

            e.Item.Font = MetroUI.Style.BaseFont;
            e.Item.ForeColor = MetroUI.Style.ForeColor;
        }
    }
}

However, the author of this does not place proper using statements in the code, so therefore it is hard to say which framework the author is indeed using.

I suggest adding MetroMenuStrip and MetroToolStrip controls to the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant