New Ribbon does not support icons from project resources

Posted by: wknauf on 15 February 2022, 8:42 pm EST

  • Posted 15 February 2022, 8:42 pm EST

    just noticed that the new ribbon in 4.5.20213.539 does not support images that are placed in "Properties\Resources.resx".

    I can add them by picking them from the resource file:


    But the generated code looks like this:

    this.ribbonButton1.IconSet.Add(new C1.Framework.C1BitmapIcon(null, new System.Drawing.Size(16, 16), System.Drawing.Color.Transparent, ((System.Drawing.Image)(resources.GetObject("ribbonButton1.IconSet")))));

    And the image is duplicated to the current form resx file.

    I would expect:

    this.ribbonButton1.IconSet.Add(new C1.Framework.C1BitmapIcon(null, new System.Drawing.Size(16, 16), System.Drawing.Color.Transparent, ((System.Drawing.Image)(global::RibbonIconSet.Properties.Resources._3d_glasses_16))));


    See attached sample: RibbonIconSet.zip

    I consider this a major problem for us, because:
    a) you cannot browse for usage of images in the global "Resources.Designer.cs" file.
    b) you cannot modify/replace the image, as they are all duplicated
    c) as they are duplicated, the resulting exe file will be larger.

    Workaround: find all usages and change them manually.

    Strange enough, when opening an old ribbon form with "SmallImage/LargeImage" properties in designer, it is converted to the new "IconSet", and here the global resource file works as expected. It happens only for newly added icons.

    Please fix this as soon as possible.

    Best regards

    Wolfgang
  • Replied 16 February 2022, 10:02 pm EST

    Hi,

    We have forwarded your request to the development team and will let you know as soon as we have an update.

    Regards
    Avnish

    [Internal Tracking ID : C1WIN-26828]
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels