Posted 15 February 2022, 8:42 pm EST - Updated 3 October 2022, 1:11 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