MetroLink with Image – MetroFramework

You may also like...

  • Pingback: MetroLink with Image - MetroFramework - DenRic ...()

  • Rod

    Sir, did you already update the code in github… cause I try to edit the source code of metroframework it successfully shows the image and nonfocus property. But every time I try to insert image it doesn’t show in the form.

    • Did you update the MetroFramwork.Design project?

      • Rod

        yes, i comment the two lines of code

        • Make sure to compile it also. Clean and Build again

          • Rod

            where can I send the files that I modified? To check if it is correct.

          • aller

            Type “if (_image != null) DrawIcon(e.Graphics);” in “protected virtual void OnPaintForeground(PaintEventArgs e)” MetroLink.cs

          • Rod

            it works now sir…Thanks 🙂

          • This is correct. Great job man : )

          • aller

            No. You are Great Man. Many thanks for sharing sources and tutorials. Waiting new controls 🙂 MetroGroup 😉

          • Rod

            Sir could you please create a tutorial about using fusionchart in with mysql 🙂

          • What specific chart do you want to use? Will try to make a sample code for tomorrow.

          • Rod

            pie chart and bar chart

          • Rod

            Bar chart and Pie chart…thanks waiting for it 🙂

  • aller

    I have same problem. Clean – Build. Image doesn’t show in the form and compiled application. How to and where add OnPaintForeground method?

  • Chandra

    I am new here…. I downloaded the zip file and when i opened the MetroFramework.sln it is not showing anything in the visual studio, nothing showing… how can i open that file ?

    Do you have a skype?

    • Did you download it from GitHub? Whats the version of your Visual Studio?

      • Chandra

        Yes, the same file which you have show in video. I am using VS 2013 express edition. If you have a skype, can you help me out with the instant reply….

        • This is a C# project. Do you have the complete VS 2013 express edition?

  • Ejhay Monton

    sir pano ko po ma uupdate yung metroframework design at pano ko po mkikita yung MetroLinkDesigner.cs wala kasi sa solution explorer ko eh

    • If you fork the sourcecode from GitHub you should have 4 projects. Metroframework, Metroframework.Design, MetroFramework.Fonts and MetroFramework.Demo you should edit Metroframework.Design project

      • Ejhay Monton

        Yon bali I import the to my project tnx sir

      • Ejhay Monton

        sir I already update the following and there’s no error but when I put a metrolink wala parin yung pag mag lalagay ako ng pic insert img

        • Make sure rebuild mo din yung MetroFramework.Design

          • Ejhay Monton

            ayaw talaga sir

          • I already uploaded my updates to GitHub. Download or For it again and make sure to open it as a solution not per project.

  • Pingback: MetroLink Properties - MetroFramework - DenRic Denise()


    sir how to use MetroFramework.Design in ?

    • You need the MetroFramework.Design DLL. I already commited my updates in GitHub just grab it from there and compile it.

  • সুখের রাজকুমার

    How to make Animation using Metro Tiles As like win8 UI.

    • That is also my question as of this moment. I am trying to make one, but right wanted to focus in making the MetroListView and MetroTreeView

      • সুখের রাজকুমার

        But,My metro framework dont have the MetroListView and MetroTreeView.

        • MetroListView and MetroTreeView is still under development.

  • Mark Gil Reyes

    hello sir Denise , ano po ang latest version ng DLL? includes update para sa link image?
    btw Thanks for this 😀

  • Yahya King

    Hello sir

    thanks a lot for your hard work

    Your Metro frame work helped me in my projects

    modern design , modern controls

    So thank you sir

    My problem is with the metro-link control

    when i add a metro-link control to my project and i add a picture to it

    when i run the project it takes time to load the user control

    it’s kind of freezing

    do you know any thing about that ?

    and thank you

  • jose luis garcia bautista

    Hello Denisse:

    I have the last version downloaded from GitHub (2015-02-01).

    I try use the MetroLink control for show a Icon and display the username taking the value from a cell from MetroGrid when i click in this.

    but I am having a problem when I set the value from Text property, the MetroLink grows and adapts to this content, but if after i set another value, the size of the control does not fit the text, On the contrary it gets bigger.


    MetroLink Size = 32, 44
    Text = “Jose Luis123456789”
    MetroLink size = 150, 44

    MetroLink size = 150,44
    Text = “Denisse”
    MetroLink size = 250,44

    Another problem is that the control location is moved from right to left when the text changes.

    Thanks alot for your answers and excuseme for my english

    • jose luis garcia bautista

      Hi Denisse:

      I solve the question using this method:

      private void MetroLinkResize(string text)


      using (Graphics cGraphics = CreateGraphics())


      mlnk.Text = string.Empty;

      SizeF sizeF = cGraphics.MeasureString(text, mlnk.Font);

      mlnk.Padding = new Padding(3);

      mlnk.Width = (int)sizeF.Width;

      mlnk.Text = text;

      mlnk.Location = new Point(_initLocation – (int)sizeF.Width, 10);



      _initLocation contains the init X position (this variable it is setting only first time, when the MetroLink control it is in the initial position)

      if (_initLocation == 0) _initLocation = mlnk.Location.X + 40;


  • Augustine Williams Bruce

    Hello Dennis, Ive gotten icons for the metrolink and it looks just as I want it. Now I want to display dropdown menus when I click on the button, any workaround?