Extract Image (as System.Drawing.Image) from Ribbon Item's IconSet

Posted by: fabio.lavitola on 26 August 2022, 9:51 am EST

    • Post Options:
    • Link

    Posted 26 August 2022, 9:51 am EST

    Hi all,

    since InputPanel Component (at the moment) do NOT have IconSet Property (It would be useful), is there a way to associate an icon set image to the Image Property?

    Something like

    Dim Img As New C1BitmapIcon(“EditComments”, New Size(16, 16), Color.Transparent, “Preset_SmallImages”, 87)

    InputMenu1.Image = Img.GetImage

    Obviously, at the moment the “GetImage” property doens’t exists…

    Thanks

  • Posted 29 August 2022, 2:57 am EST

    Hi Fabio,

    To get the System.Drawing.Image from the C1BitmapIcon, you can use the GetPresetImage method of the C1Ribbon. Kindly refer to the attached sample showing the same.

    GetImage_C1Icon.zip

    Best Regards,

    Kartik

  • Posted 29 August 2022, 3:38 am EST

    Thank you Kartik, it works.

    Anyway, having the same imaging management would be more efficient than “IconSet” on one hand and “Image” property on the other, IMHO.

    But at the moment, with this solution, I need to have a Riibbon too…

    I’ll try some USING / END USING feature…

  • Posted 30 August 2022, 2:28 am EST

    Hi,

    Since the C1Ribbon can be used in different size modes, it uses the IconSet property to store icons for different sizes, which can be switched by the C1Ribbon when required. Currently, you will need to use the above way only to get the Preset Images from C1Ribbon.

    Thanks, and Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels