0

I will talk short and specific:

http://prnt.sc/d2t8k7

I installed packages for MetroFramework but there's no MetroMenuStrip and the other tools.

When I search the web I see too much examples about MetroMenuStrip. But nobody has any problem like mine.

I tried with all these package codes :

  • Install-Package Winform.Metroframework

  • Install-Package MetroFramework

  • Install-Package MetroModernUI

  • Install-Package MetroFramework.Design

Thanks.

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
Ertan Turan
  • 1
  • 1
  • 2

1 Answers1

0

Finally I found a way ...

I added the MenuStrip to this framework by writing this codes :

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;
        }
    }
}

create a file in your project. and create class in this file as "MetroMenuStrip.cs"

and use this code.

Ertan Turan
  • 1
  • 1
  • 2